Home
- POV-Ray Tutorials
POV-Ray Introduction
Content - INDEX
0. Working with POV-Ray:
"Insert Menu Add-on".
1. Basics
on writing texts.
2. 3D Coordinates,
Floats and Vectors
3. Scene Structur
#include files,
camera,
light_source.
Types of light sources
>4. Basic Objects plane, sphere,
box, cylinder, cone, torus.
Other Shapes
height_field, text, etc.
5. Transformations
Streching, Turning,
Moving and others.
CSG: union,
difference, intersection.
6. Color + Surfaces
texture, pigment, normal, finish
7. #declare, #local,
#macro .. #end,
#include,
re-usable objects.
8. #while Loops
9. Efficiency,
speed, flexibility,
modulare working
adapting from 3.1 to 3.5;3.6
adapting from 3.5;3.6 to 3.7
POV-Ray + Windows Vista.
- Insert Menu Add-on
& Download
|
1. |
Sphere:
sphere{< 0, 1, 0>, 0.5
texture{Glass3}}
center <xM.yM,zM>, radius ... |
|
|
2. |
Cylinder / tube:
cylinder{< 0, 0, 0>,< 0, 1, 0>, 0.1
pigment {color Orange}}
center at one end <xM1,yM1,zM1>,
center at the other end <xM2,yM2,zM2>, radius. |
|
|
3. |
Cone / trunced cone / conus:
cone{< 0, 0, 0>, 1.25, < 0, 2.5, 0>, 0.5
pigment {color YellowGreen}}
center at one end <xM1,yM1,zM1>, radius at one end,
center at the other end <xM2,yM2,zM2>, radius at the other end. |
|
|
4. |
Torus / ring / tire:
torus{ 1, 0.25 rotate<90,0,0> translate< 0, 1+0.25, 0>
pigment {color rgb< 1, 0.8, 0>}}
radius of the ring to center of the tire: rmajor, and radius of the tire: ,rminor.
The torus shape is placed in the xz plane, his axis is the y axis.
With this sample you will get a ring which is standing vertical in the xy plane
with his axis parallel to the z axis. |
|
|
5. |
Rectangular parallelepiped / box:
box{<-1,-1,-1>,< 1, 3, 2>
pigment {color MediumOrchid}}
Two opposite corners: <x1.y1,z1>
<x2,y2,z2> :
The box reaches in x-direction from x1 to x2,
in y direction from y1 to y2 and in z direction from z1 to z2.
. |
|
|
6. |
Ortogonal prism:
prism{ -1, 0, 3, <-1, 0>, < 1, 0>, < 0,1.5>
pigment {color White}}
{from z =... , to z = ..., number of points of the base, xz coordinates separated by commas}
The prism is placed with it's parallel sides parallel to the y-axis and is defined by
the edges of it's sectional view, which is in it's basic form defined in the xz plane.
By rotations of 90° around the axis, it is possible to get prisms in z direction,
in x-direction or in any other directions! |
|
|
7. |
Infinite Plane (more precise: a half space):
plane{ < 0, 1, 0>, 0
texture{Cork}}
<0,1,0> = "surface normal".
In < , , >, 0
the 4th float defines the distance to <0,0,0>!
The surface normal is a vector that stands vertical on the plane.
Here: < 0, 1, 0> points to positive direction of y,
that means the plane is horizontal, it is the xz plane.
(Strictly speaking this "plane" defines a "half space", which contains the space behind
(or under) this plane, right opposite to where the "surface normal" is pointing to.
This is important, if you use the object "plane" in "union",
"difference" or "intersection" ( see: "CSG" ), because this "half space"
is the "inside" of the plane. )
|
|
|
|
These shapes are using the color index of images as height value.
|
|
|
Three dimensional text in various forms (all truetype fonts).
|
|
|
|
|
Regulare polygons:
"shapes2.inc" this include file declares among other things regular polygons like e.g. pyramid,
dodecahedron, octahedron and icosahedron. |
|
|
|
Paraboloid, Hyperboloid:
"shapes.inc" this include file declares among other things different paraboloids and hyperboloids. |
|
|
Isosurfaces are showing a great variety of shapes defined by three dimensional functions.
Attention:
Isosurfaces cannot be used with the CSG statements "difference"
and "intersection"! For CSG with isosurfaces we need the (not easy to handle)
include file "ISO_CSG.inc" made by Christoph Hormann.
|
|
|
Geometric surfaces by equations of higher order:
Samples for "cubic", "quadric", "quartic" and "polynomial"
as cubic saddle, devil's curve in 3d space, helix and many other mathematically complicated surfaces
you will find in "shapesQ.inc".
sor - surface of revolution: Rotation of a closed spline curve around the y axis.
lathe: Rotation of a spline curve around the y axis similar to sor.
superquadric ellipsoid: Shapes of boxes and cylinders with rounded edges.
- Just the right thing for upholstery of chairs!
blob: A drop shaped object, which is produced by the merging shapes of
spheres and cylinders.
julia fractal: A three dimensional fractal object.
2D-faces, which are not or are only limited usable in csg:
disc: A simple disc, also with a hole in the middle.
triangle: a simple triangle.
smooth_triangle: a triangle, which surface normal vectors on each in the three corners are
explicitly defined and the other normal vectors between are averaged. Because these surface normal vectors are
used to calculate light reflection the surface appears as smooth curved in meshes of these objects.
polygon: - this is a possibility to create 2D-faces, by points.
bicubic patch: A freeform surface, defined with by some control points (3d-Bézier curve).
The object is realized by a mesh of triangles.
mesh: A net of triangle faces, mostly produced by other 3d programs.
A especially fast and memory saving method for calculating shapes out of meshes of triangles.
This list is not complete!!!
To get a more complete imagination of more of the build-in shapes see the description of my Insert Menu Add-on.
|