POV-Ray : Newsgroups : povray.unofficial.patches : 360 degrees with isosurface? : Re: 360 degrees with isosurface? Server Time
2 Sep 2024 16:22:17 EDT (-0400)
  Re: 360 degrees with isosurface?  
From: Chris Huff
Date: 11 Dec 1999 06:50:30
Message: <chrishuff_99-4FFAE9.06505511121999@news.povray.org>
In article <3851D4A6.B814D927@aol.com>, "SamuelT." <STB### [at] aolcom> 
wrote:

> I was wondering if it was possible to make, say, a hexagon from an
> isosurface. I can't seem to figure out a good way to make anything but
> cubic objects. No matter how complex an object may seem , deep down it
> is within cubic guidelines. Is there any way to make objects that use
> the 360 degree model, to make seven-sided and higher polygons? If not,
> can it be implemented in future versions of the isosurface? Thanks in
> advance.

It is definitely possible. Look at the trig functions for the 
isosurface, you can do just about anything with them.

//Makes a hexagonal prism, the angles given to the trig functions
//are the angles of the sides
isosurface {
   function {
      (z*sin(radians(0)) + x*cos(radians(0)) - 1)
      &(z*sin(radians(60)) + x*cos(radians(60)) - 1)
      &(z*sin(radians(120)) + x*cos(radians(120)) - 1)
      &(z*sin(radians(180)) + x*cos(radians(180)) - 1)
      &(z*sin(radians(240)) + x*cos(radians(240)) - 1)
      &(z*sin(radians(300)) + x*cos(radians(300)) - 1)
      &(abs(y) - 1)
   }
   threshold 0
   clipped_by{box {<-5, -5, -15>, < 5, 5, 5>}}
   accuracy 0.001
   texture {ComYw}
}

-- 
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.