Una sfera
La luce colpisce la sfera dall’alto.
#include "colors.inc" plane{ y,-2 pigment{ checker color White color Black } } sphere{ < 0,0,0>,1 pigment{ color Green } } camera { location<0,0,-4> look_at<0,0,0> } light_source{ <0,4,-4> color White }
Con riflessione
La superficie della sfera riflette il mondo circostante.
#include "colors.inc" plane{ y,-2 pigment{ checker color White color Black } } sphere{ < 0,0,0>,1 pigment{ color Green } finish { reflection .50 } } camera { location <0,0,-4> look_at<0,0,0> } light_source{ <0,4,-4> color White }
Riflessione diversa
Tre livelli di riflessione: 0.25, 0.50, 0.75.
Si nota il riflesso di una sfera nell’altra…
#include "colors.inc" plane{ y,-2 pigment{ checker color White color Black } } sphere{ <-2,0,0>,1 pigment{ color Green } finish { reflection .25 } } sphere{ < 0,0,0>,1 pigment{ color Green } finish { reflection .50 } } sphere{ <+2,0,0>,1 pigment{ color Green } finish { reflection .75 } } camera { location<0,0,-6> look_at<0,0,0> } light_source{ <0,6,-6> color White }
Tre sfere riflettenti
Le tre sfere di colore rosso, verde e blue e posizione verticale +2, 0, -2.
#include "colors.inc" plane{ y,-2 pigment{ checker color White color Black } } sphere{ <-2,+1,0>,1 pigment{ color Red } finish { reflection .5 } } sphere{ < 0, 0,0>,1 pigment{ color Green } finish { reflection .5 } } sphere{ <+2,-1,0>,1 pigment{ color Blue } finish { reflection .5 } } camera { location <0,0,-6> look_at<0,0,0> } light_source{ <0,6,-6> color White }