POV-Ray : Newsgroups : povray.advanced-users : Isosurface math questions : Re: Isosurface math questions Server Time
2 Nov 2024 09:20:37 EDT (-0400)
  Re: Isosurface math questions  
From: Chris Huff
Date: 16 Dec 1999 18:39:14
Message: <chrishuff_99-8BB908.18394416121999@news.povray.org>
Here is a list of the functions and keywords available(from a template 
menu in MacMegaPOV):
x y z
clock pi
+ - * / ^ & | %

cos() cosh() acos() acosh()
sin() sinh() asin() asinh()
tan() tanh() atan() atanh() atan2(a, b)

abs() ceil() floor() min() max()
sqrt() cub() exp()

noise3d(x, y, z)

degrees() radians()

if(a, b, c)


And an example of mixing functions:
isosurface {
   function {
      (1-sqrt(x^2 + y^2 + z^2))//The spherical function
      - (sin(atan2(x, z)*7 + y*3)*0.15)//a helical function
   }
   threshold 0
   bounded_by{box {<-5,-5,-5>, < 5, 5, 5>}}
   accuracy 0.001
   texture {WhateverTextureYouWant}
}

In case you are interested, the helical function is controlled like this:
- (sin(atan2(x, z)*NumberOfRidges + y*AmountOfTwist)*RidgeDepth)

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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