Curved polygon

Consider a polygon of N sides. On one side of this polygon draw a semicircle of diameter less than the length of the side. Draw an arc with center on one of the vertices adjacent that connects to the first semicircle. The process is repeated on each side. If the first semicircle is located outside the shape is set with the convex parameter.

polig_curve (
N, // number of sides
mj_rad_A, // radius of the central semicircle
mj_rad_B, // radius of the arc in the vertex
min_rad_c, // thickness
convex, // set concavity (on/off)
design // included 4 little variations on the shape's geometry
)

Download: polig_curve.mcr

 

 

 
Posted in Sin categoría | Leave a comment

Slices

Possibly one of the first macros that were written for Pov-Ray when  the conditional statements were implemented, although I don’t know who was the first to devise it or write it. My CAT macro for scanning of objects is based on the idea that was used here.

Continue reading

 
Posted in Macros | Tagged | Leave a comment

Color Wheel

This macro was originally published in the POV-Ray user forum  in August 2011 and is a simple modification of the macro included in “colors.inc” to switch from RGB to HSV. This macro returns the pigment located at ”A” degrees of the input pigment into the color wheel. It is valid to calculate complementary colors. triads of color, etc …
Continue reading

 
Posted in Macros | Tagged , | Leave a comment

Trigonometry in Pov-Ray

One of my worst vices in math has always been having to rethink and rewrite the same formulas in different scenes for simple math calculations in POV-Ray. See here, a simple macro to calculate angles, sides and areas of regular polygons.
Continue reading

 
Posted in Macros | Tagged , , , , | Leave a comment

The Persistence Of Vision Ray-Tracer

The Persistence of Vision Ray-Tracer creates three-dimensional, photo-realistic images using a rendering technique called ray-tracing. It reads in a text file containing information describing the objects and lighting in a scene and generates an image of that scene from the view point of a camera also described in the text file. Ray-tracing is not a fast process by any means, but it produces very high quality images with realistic reflections, shading, focal blur, perspective and other effects.

This program was first published in 1991 and has its origins in a program called DKBTrace 2.12 created by David K. Buck and Aaron Collins for the AMIGA environment. The full story can be found on the official website of the program (here), but can be summarized in a group of fans to the synthetic image (grouped under the POV Team) sought permission from David K. Buck to continue the updating for a program which David had no time to improve. The list of people who have collaborated altruistically over the years by modifying the code, writing scenes, tutorials or include files is almost endless.

Recommended:

 
Posted in Sin categoría | Tagged , , | 2 Comments