John's Other .INC Files

    I took this page down a while back, becuase I didn't think anyone was that interested, and because I wanted the space for other things. Well, someone wanted the stuff, and I've got the space, so now it's back up.
Alphabet Blocks
blocks.zip

(702 bytes, unzips to 1685 bytes)

    This file contains a macro which will place alphabet blocks into your scene. The blocks fit into a cube that is three units along each edge. They face in the +z direction, and are centered around the y axis, with the bottom lying in the y=0 plane. Here is an example using five of the blocks:

    The file creates a set of macros that are used to create the block; the user supplies a pigment to the macro, and then translates it around. One example goes like this:

   object { AlphaBlock("B",rgb <1,0,0>) rotate y*5 translate x*3.0 }
This creates a block with the letter B, and which is touched with red on the front and back.
    The macro uses the timrom.ttf font that comes with POV-Ray, and automatically aligns the letter within the block.
    In order to randomly align the patterned texture of the wooden blocks, the macro also uses the variable BlockSeed as a random number seed.

Rock maker files
rock.zip

(4368 bytes)

    This ZIP contains two files. The file makerock.inc creates a mesh object by fractally slicing up an icosahedron. The file filerock.inc writes a mesh object to a new .INC file, so that if you're satisfied with the appearance of the rock, you don't need to wait for parsing to regenerate it.

    To use either file, you must first specify a set of parameters, and then #include the file. The following parameters control the appearance of the rock:

  • Smooth: Set this to true to specify smooth_triangles for the mesh (the normals will be automatically calculated; set to false to leave them out. The default setting is true.
  • Seed: Set this to an integer representing the random number seed value. The default is 0.
  • Splits: This sets the number of times the fractal division is performed. The default is 1.
  • Size: Set the radius of the initial mesh. The default is 10.
  • Rough: Sets the range of the roughness added to each division level. The default is .2.
  • Rounding: If true forces the mesh to a more spherical shape; if false, leaves the original iscosahedral shape in place. The default value is true.
  • Omega: Sets the amount by which the value of Rough is multiplied at each division level. The default value is .5.
  • FileName: Specifies the name of the file when using filerock.inc. The default value is "rock####.inc", where #### is the value of Seed, padded on the left with zeroes.

    The rock is created at the origin, with no texturing, so you'll need to wrap the file invocation in an object statement, and apply whatever transforms and texturing you want.


    Back to John's POV-Ray Page
    Hosted by www.Geocities.ws

    1