Wireframe
Gli spigoli 12 cilindri… di 4 colori
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
#include "colors.inc" cylinder{ < 1, 1, 1> < 1, 1,-1>, 0.1 pigment{ color Blue } } cylinder{ < 1, 1, 1> < 1,-1, 1>, 0.1 pigment{ color Blue } } cylinder{ < 1, 1, 1> <-1, 1, 1>, 0.1 pigment{ color Blue } } cylinder{ < 1,-1,-1> < 1, 1,-1>, 0.1 pigment{ color Cyan } } cylinder{ < 1,-1,-1> < 1,-1, 1>, 0.1 pigment{ color Cyan } } cylinder{ < 1,-1,-1> <-1,-1,-1>, 0.1 pigment{ color Cyan } } cylinder{ <-1,-1, 1> <-1, 1, 1>, 0.1 pigment{ color Green } } cylinder{ <-1,-1, 1> < 1,-1, 1>, 0.1 pigment{ color Green } } cylinder{ <-1,-1, 1> <-1,-1,-1>, 0.1 pigment{ color Green } } cylinder{ <-1, 1,-1> < 1, 1,-1>, 0.1 pigment{ color Yellow } } cylinder{ <-1, 1,-1> <-1, 1, 1>, 0.1 pigment{ color Yellow } } cylinder{ <-1, 1,-1> <-1,-1,-1>, 0.1 pigment{ color Yellow } } camera { location<0,0,-4> look_at<0,0,0> } light_source{ <0,0,-4> color White } |
Spigoli e vertici 12 cilindri + 8 sfere
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#include "colors.inc" cylinder{ < 1, 1, 1> < 1, 1,-1>, 0.1 pigment{ color Blue } } cylinder{ < 1, 1, 1> < 1,-1, 1>, 0.1 pigment{ color Blue } } cylinder{ < 1, 1, 1> <-1, 1, 1>, 0.1 pigment{ color Blue } } cylinder{ < 1,-1,-1> < 1, 1,-1>, 0.1 pigment{ color Cyan } } cylinder{ < 1,-1,-1> < 1,-1, 1>, 0.1 pigment{ color Cyan } } cylinder{ < 1,-1,-1> <-1,-1,-1>, 0.1 pigment{ color Cyan } } cylinder{ <-1,-1, 1> <-1, 1, 1>, 0.1 pigment{ color Green } } cylinder{ <-1,-1, 1> < 1,-1, 1>, 0.1 pigment{ color Green } } cylinder{ <-1,-1, 1> <-1,-1,-1>, 0.1 pigment{ color Green } } cylinder{ <-1, 1,-1> < 1, 1,-1>, 0.1 pigment{ color Yellow } } cylinder{ <-1, 1,-1> <-1, 1, 1>, 0.1 pigment{ color Yellow } } cylinder{ <-1, 1,-1> <-1,-1,-1>, 0.1 pigment{ color Yellow } } sphere{ < 1, 1, 1> 0.2 pigment{ color Red } } sphere{ < 1, 1,-1> 0.2 pigment{ color Red } } sphere{ < 1,-1, 1> 0.2 pigment{ color Red } } sphere{ < 1,-1,-1> 0.2 pigment{ color Red } } sphere{ <-1, 1, 1> 0.2 pigment{ color Red } } sphere{ <-1, 1,-1> 0.2 pigment{ color Red } } sphere{ <-1,-1, 1> 0.2 pigment{ color Red } } sphere{ <-1,-1,-1> 0.2 pigment{ color Red } } camera { location<0,0,-4> look_at<0,0,0> } light_source{ <0,0,-4> color White } |
Punto di vista L’osservatore si sposta a sinistra, in alto
1 2 3 |
... camera { location<-4,2,-3> look_at<0,0,0> } light_source{ <-4,2,-3> color White } |
Macro La libreria shapes.inc contiene una macro per un box wireframe. I parametri specificano i due vertici opposti e il raggio dei cilindri e delle sfere utilizzate.
1 2 3 4 5 6 7 |
#include "shapes.inc" #include "colors.inc" object{ Wire_Box_Union(<-1,-1,-1>, <1,1,1>, 0.1) pigment{ color White } } light_source{ <0,0,-4>, color White } camera{ location<0,0,-4> look_at<0,0,0> } |
Cubi wireframe I … Leggi tutto