Home
- POV-Ray Tutorial
Geometrische Körper
Inhaltsübersicht
Objekte in "shapes3.inc"
- Segment_of_CylinderRing
- Segment_of_Torus
- Segment_of_Object
- Egg
- Egg_Shape
- Facetted_Egg
- Facetted_Egg_Shape
>Facetted_Sphere
- Ring_Sphere
- Column_N
- Column_N_AB
- Pyramid_N
- Pyramid_N_AB
- Round_Pyramid_N_out
- Round_Pyramid_N_in
- Round_Cylinder_Tube
- Rounded_Tube_AB
- Rounded_Tube
- Round_N_Tube_Polygon
- Round_Conic_Torus
- Round_Conic_Prism
- Half_Hollowed_Rounded_Cyl1
- Half_Hollowed_Rounded_Cyl2
|
Geometrische Körper aus meiner Include-Datei "shapes3.inc"
( ehemals "shapes_lo.inc"):
|
Facetted_Sphere
Syntax:
object{ Facetted_Sphere( Quarter_Meridian_Segments,
Equatorial_Segments
) //----------------------
scale 1.00
} // end of object ------------------------ |
Quarter_Meridian_Segments =
Anzahl der Segmente in einem Viertel des Meridians,
Equatorial_Segments =
Anzahl der Segmente längs des Äquators.
Der Radius der Umrisslinie ist auf 1 Einheit skaliert.
Beispiel:
#include "shapes3.inc"
object{ Facetted_Sphere (6, 16 )
texture{ pigment{ color rgb <1,1,1>}
finish { phong 0.1}
} // end texture
scale <1,1,1> rotate <0,0,0>
translate < 0, 1, 0>
} // end of object -------------------- |
|
Hier einige Variationen dieses Makro-Objekts:
|
Variationen der "Facetted_Sphere(...)" |
|
Das Makro im Detail
Dies wird durch eine Schnittmenge von Prismen mit einer kugelförmig facettierten Umrisslinie an einer Kante erzeugt:
|
|
Facetted_Sphere - 1 Prismen-Element als Schnittmenge
|
Facetted_Sphere (6, 12 ) = Schnittmenge von 12 Prismen
|
// ----------------------- macro Facetted_Sphere()
#macro Facetted_Sphere( Quarter_Meridian_Segments,
Equatorial_Segments
) //------------------------
#local Facets_Silhouette =
prism {
-2 ,2 ,
2*Quarter_Meridian_Segments+4
< -2,-1.00 >,
#local Nr = -Quarter_Meridian_Segments;
#local EndNr = Quarter_Meridian_Segments;
#while (Nr < EndNr+1)
#local Angle_degrees = Nr* 90/EndNr;
#local Angle_radians = radians(Angle_degrees);
< cos(Angle_radians) , sin(Angle_radians)>,
#local Nr = Nr + 1 ;
#end
< -2, 1 >,
< -2,-1 >
//turns prism in z direction:
rotate<-90,0,0> scale<1,1,-1>
} // end of prism object -------------------------
intersection{
#local Nr = 0; // start
#local EndNr = Equatorial_Segments; // end
#while (Nr < EndNr)
object{ Facets_Silhouette
rotate<0,Nr * 360/EndNr,0>
} //------------------------------
#local Nr = Nr + 1; // next Nr
#end // --------------- end of loop
} // end of intersection
#end //------------- end of macro Facetted_Sphere() |
|
|