lehrkraefte:blc:math:povray:lektion5

This is an old revision of the document!


Rendern Sie folgenden Code und studieren Sie diesen. Stellen Sie danach Fragen, wenn Sie etwas nicht verstehen.

funktionen.pov
// Kamera
camera { 
  sky <0,0,1>           // Vektor, der festlegt, wo oben ist.
  right <-4/3,0,0>     // Bildverhaeltnis 4:3, plus Spiegelung für rechtsdrehendes System
  location <10,0,0>    // Position der Kamera
  look_at <0, 0, 0>    // Blickrichtung (erscheint im Bildmittelpunkt)
  angle 35             // Oeffnungswinkel der Kamera
}
 
// Lichtquellen
light_source { 
  <60,-20,80>              // Position des Lichts
  color rgb <1,1,1>     // Farbe des Lichts, als rot-gruen-blau Vektor (Komponenten 0 bis 1)
}
light_source { 
  <30,100,30>              // Position des Lichts
  color rgb <1,1,1>     // Farbe des Lichts, als rot-gruen-blau Vektor (Komponenten 0 bis 1)
}
 
// yz-Ebene
plane {x,0
  pigment { checker color rgb 0.2 color rgb 0.9 }
}
// y,z-Achse
union {
  cylinder { -2*y, 2*y, 0.05 }
  cylinder { -2*z, 2*z, 0.05 }
  cone {2*y, 0.1, 2.3*y, 0 }
  cone {2*z, 0.1, 2.3*z, 0 }
  text { ttf "timrom.ttf" "y" 0.1, <0,0,0>
    rotate 90*x
    rotate 90*z
    translate 2.3*y
  }
  text { ttf "timrom.ttf" "z" 0.1, <0,0,0>
    rotate 90*x
    rotate 90*z
    translate 1.8*z+0.2*y
  }
  pigment { color rgb z }
  finish { phong 0.95 }
}
 
// Berechnet den Funktionswert an der Stelle xx (x ist schon definiert)
#macro meinf(xx)
  xx*xx-2 // Wert der Funktion
#end
 
#declare starty=-2;
#declare endy=2;
#declare n=100;
#declare dy=(endy-starty)/n;
#while (starty<endy) 
  sphere { <0,starty, meinf(starty)>, 0.02
    pigment { color rgb x }
  }
  #declare starty=starty+dy;
#end
  • lehrkraefte/blc/math/povray/lektion5.1496221885.txt.gz
  • Last modified: 2017/05/31 11:11
  • by Ivo Blöchliger