POV-Ray : Newsgroups : povray.text.scene-files : Screwy isosurafce code Server Time
28 Jul 2024 18:21:24 EDT (-0400)
  Screwy isosurafce code (Message 1 to 1 of 1)  
From: SamuelT 
Subject: Screwy isosurafce code
Date: 31 Jul 1999 17:07:57
Message: <37A36668.E3F85BA3@aol.com>
Here is the code for the screw-shaped object. The example image is at
the images section of this newsgroup.

Hey, look! I indented my code! ;) Beware of any line-wrapping that may
occur if you paste this cose into your pov scene.

Samuel Benge


//This Code Requires That You Use Superpatch Version 3.1e

//This pigment will warp the isosurface object. The triangle_wave gives
us the sharp, saw-toothed surface.
#declare P1=function{pigment{spiral1 12 rotate x*90 scale y*.25
triangle_wave color_map{[0 rgb<1 0 0>][1 rgb<0 1 0>]}}}

isosurface{
 function{
  (P1(x,y,z)*.1)    //This is how you initialize the pigment within the
function. The *.1 is how strong the pigment will affect the isosurface.
  +(x^2+z^2+.5)    //This is a basic cylinder along the y-axis. The +.5
shrinks it slightly.
 }
 threshold 1
 sign 1
 accuracy .015  //I found this value optimal for working with isosurface
pigment functions.
 method 2
 max_gradient 5
 pigment{rgb .3}
 finish{specular 1 reflection .6}
 hollow
}


Post a reply to this message


Attachments:
Download 'us-ascii' (1 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.