POV-Ray : Newsgroups : povray.binaries.images : Isosurface question Server Time
17 Aug 2024 10:13:13 EDT (-0400)
  Isosurface question (Message 1 to 3 of 3)  
From: banty
Subject: Isosurface question
Date: 17 Oct 2001 18:32:36
Message: <3BCE093C.53B3FD97@rapidnet.com>
I know that the function below can probably be streamlined a tad,
but I'm not overly qualified in the math deprtment.  What's here is a
product of brain bashing experimentation and just a little inspiration
but I'm stuck.
    Could someone tell be how to add faces to this surface?
    And If there's a simpler way to define it?


A.D.B

function { (y+x&y+(-x))&y+z&y+(-z) }


Post a reply to this message

From: Bill DeWitt
Subject: Re: Isosurface question
Date: 17 Oct 2001 18:44:16
Message: <3bce09c0$1@news.povray.org>
"banty" <ban### [at] rapidnetcom> wrote in message
news:3BCE093C.53B3FD97@rapidnet.com...
>     I know that the function below can probably be streamlined a tad,
> but I'm not overly qualified in the math deprtment.  What's here is a
> product of brain bashing experimentation and just a little inspiration
> but I'm stuck.
>     Could someone tell be how to add faces to this surface?
>     And If there's a simpler way to define it?
>
>
> A.D.B
>
> function { (y+x&y+(-x))&y+z&y+(-z) }

    I don't know the answer to your question, but I know that you will get a
better response to it by posting it in the proper group. That would be
povray.general


Post a reply to this message

From: Mike Williams
Subject: Re: Isosurface question
Date: 18 Oct 2001 02:56:02
Message: <qVcR4CA6mnz7Ew49@econym.demon.co.uk>
Wasn't it banty who wrote:
>    I know that the function below can probably be streamlined a tad,
>but I'm not overly qualified in the math deprtment.  What's here is a
>product of brain bashing experimentation and just a little inspiration
>but I'm stuck.
>    Could someone tell be how to add faces to this surface?
>    And If there's a simpler way to define it?
>
>
>A.D.B
>
>function { (y+x&y+(-x))&y+z&y+(-z) }

By "add faces" do you mean something like this?

#declare Sides=7;

#declare Angle=2*pi/Sides;
isosurface {
  function { x+y 
    #declare A = Angle;
    #while (A < 2*pi)
      & y + x*cos(A) + z*sin(A)
      #declare A=A+Angle;  
    #end
   }
   ...

Change the value of "Sides" to produce a pyramid with that number of
faces.

I can't immediately think of any simpler way to define it.

If the required number of faces is double an odd number, you can render
it twice as fast by setting "Sides" to that odd number and using       
       & y + abs(x*cos(A)) + z*sin(A)
(E.g. if you wanted a pyramid with 14 faces you'd set Sides=7 and use
this abs() trick to double it up).

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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