A source of light for a 3d SVG picture. This corresponds to the SVG "specular" lighting, use the property Specular. The location is given by Center. By default a Light is invisible (it has opacity 0) and is unaffected by matrix transformations outside it (Static true).
i1 : Light{Radius=>10,"opacity"=>"1","fill"=>"yellow"}
o1 = Light{Blur => .3 }
cache => CacheTable{}
Center => | 0 |
| 0 |
| 0 |
| 1 |
fill => yellow
Is3d => true
opacity => 1
Radius => 10
Specular => 64
Static => true
stroke => none
o1 : Light
|
i2 : v={(74.5571, 52.0137, -41.6631),(27.2634, -29.9211, 91.4409),(-81.3041, 57.8325, 6.71156),(-20.5165, -79.9251, -56.4894)};
|
i3 : f={{v#2,v#1,v#0},{v#0,v#1,v#3},{v#0,v#3,v#2},{v#1,v#2,v#3}};
|
i4 : c={"red","green","blue","yellow"};
|
i5 : tetra=gList(apply(4,i->Polygon{f#i,"fill"=>c#i,"stroke"=>"none"}),
Light{(110,0,0),Radius=>10,"opacity"=>"1"},ViewPort=>{(-110,-100),(110,100)},
SizeY=>30,TransformMatrix=>rotation(-1.5,(4,1,0)))
o5 = tetra
o5 : GraphicsList
|
Do not use the same Light object multiple times in a given GraphicsList.
The object Light is an instance of the type GraphicsType, with ancestor classes Circle < GraphicsObject < HashTable < Thing.