Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| lehrkraefte:blc:math:povray:lektion7 [2017/06/15 17:48] – Marcel Metzler | lehrkraefte:blc:math:povray:lektion7 [2017/06/16 05:43] (current) – [Aufgabe 2] Ivo Blöchliger | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ==== Aufgabe 0 ==== | ||
| + | Die heutige Lektion steht und dem Thema Galaxien, oder etwas mathematischer die archimedische Spirale und selbstähnliche Figuren. | ||
| + | {{: | ||
| + | |||
| + | Spielen Sie mit den Farben und den Formen. | ||
| + | |||
| + | ==== Aufgabe 1 ==== | ||
| + | Rendern Sie folgenden Code und studieren Sie diesen. Stellen Sie danach Fragen, wenn Sie etwas nicht verstehen. | ||
| + | <code povray Galaxie-gruen.pov> | ||
| + | // Kamera | ||
| + | camera { | ||
| + | sky < | ||
| + | right < | ||
| + | location < | ||
| + | look_at <0, 0, 0> | ||
| + | angle 70 | ||
| + | } | ||
| + | |||
| + | // Lichtquellen | ||
| + | light_source { | ||
| + | < | ||
| + | color rgb < | ||
| + | } | ||
| + | |||
| + | light_source { | ||
| + | < | ||
| + | color rgb < | ||
| + | } | ||
| + | |||
| + | light_source { | ||
| + | < | ||
| + | color rgb < | ||
| + | } | ||
| + | |||
| + | plane {z,0 | ||
| + | pigment | ||
| + | normal { bozo } | ||
| + | finish { reflection 0.9} | ||
| + | } | ||
| + | |||
| + | //#include " | ||
| + | |||
| + | //Hier entsteht eine Galaxie | ||
| + | #declare Galaxie = union { | ||
| + | |||
| + | # | ||
| + | # | ||
| + | |||
| + | # | ||
| + | | ||
| + | // | ||
| + | | ||
| + | | ||
| + | | ||
| + | scale 0.01*alfa*< | ||
| + | } | ||
| + | #declare alfa=alfa+da; | ||
| + | # | ||
| + | } | ||
| + | |||
| + | |||
| + | // Hier entsteht das Universum | ||
| + | #declare dphi=0.4; | ||
| + | #declare phi=dphi; | ||
| + | |||
| + | #while (phi< | ||
| + | | ||
| + | translate < | ||
| + | rotate phi*180/ | ||
| + | scale 0.1*phi*< | ||
| + | } | ||
| + | #declare phi=phi+dphi; | ||
| + | # | ||
| + | |||
| + | </ | ||
| + | ==== Aufgabe 2 ==== | ||
| + | Ändern Sie den obigen Code so ab, dass entweder | ||
| + | - die Galaxien abwechslungsweise rot, grün und blau sind oder | ||
| + | - die Objekte in einer Galaxie rot, grün und blau sind. | ||
| + | |||
| + | Vergleichen Sie dazu [[lehrkraefte: | ||
| + | |||
| + | z.B. so {{: | ||
| + | |||
| + | ==== Aufgabe 3 ==== | ||
| + | Ändern Sie das Basisobjekt in abwechslungsweise Kugel, Würfel und Kegel. Einmal in | ||
| + | - Galaxie für Galaxie | ||
| + | - Objekt für Objekt in einer Galaxie. | ||
| + | |||
| + | ==== Aufgabe 4 ==== | ||
| + | Erstelle ein eigenes Basisobjekt und speichere dies unter < | ||
| + | < | ||
| + | # | ||
| + | // M als Grossbuchstabe | ||
| + | box { < | ||
| + | } | ||
| + | box { < | ||
| + | translate < | ||
| + | } | ||
| + | box { < | ||
| + | rotate atan(1/ | ||
| + | translate < | ||
| + | } | ||
| + | box { < | ||
| + | rotate -atan(1/ | ||
| + | translate < | ||
| + | } | ||
| + | ... | ||
| + | } | ||
| + | </ | ||
| + | zusammen. Mit < | ||
| + | |||
| + | ==== Aufgabe 5 ==== | ||
| + | Erstelle eine Animation, indem mit der Kamera über die Galaxien hinweg geflogen wird. | ||