POV-Ray : Newsgroups : povray.advanced-users : Req: isosurface function Server Time
19 Oct 2026 06:16:49 EDT (-0400)
  Req: isosurface function (Message 1 to 20 of 20)  
From: Margus Ramst
Subject: Req: isosurface function
Date: 16 Nov 1999 19:06:51
Message: <3831F244.2665456B@peak.edu.ee>
Could somebody provide me with a function (preferably in a no-brainer macro form
:) that gives concentric cones? I want to use it in a pigment...
Thanks

Margus


Post a reply to this message

From: Peter Popov
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 03:05:30
Message: <dF0yOJvKet+xMsPMYJ4SUMtm7RYo@4ax.com>
On Wed, 17 Nov 1999 02:09:40 +0200, Margus Ramst <mar### [at] peakeduee>
wrote:

>Could somebody provide me with a function (preferably in a no-brainer macro form
>:) that gives concentric cones? I want to use it in a pigment...
>Thanks
>
>Margus

Concetric in what manner? Sharing a common vertex and concentric in
terms of angle, or sharing a common angle and concentric in terms of
vertex and base?


Peter Popov
ICQ: 15002700


Post a reply to this message

From: Margus Ramst
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 05:56:43
Message: <38328A93.B4588A1@peak.edu.ee>
The latter.

Margus

Peter Popov wrote:
> 
> Concetric in what manner? Sharing a common vertex and concentric in
> terms of angle, or sharing a common angle and concentric in terms of
> vertex and base?
> 
> Peter Popov
> ICQ: 15002700


Post a reply to this message

From: Gilles Tran
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 08:11:40
Message: <3832A98B.640E9D35@inapg.inra.fr>
Still not sure to fully understand what you need, but would something like
this work ?
(To be used with the superpatch of course)
camera{location  -z*10  look_at   0}
plane{ z,0
  texture {pigment {crackle      form x      frequency 3
      color_map{[0 color <1,0,0>][0.25 color <1,1,0>][0.5 color rgb
0][0.75 color <0,0,1>][1 color <0,1,0>]}         }
    finish{ambient 1 diffuse 0}
  }
}

G.

Margus Ramst wrote:

> The latter.
>
> Margus
>
> Peter Popov wrote:
> >
> > Concetric in what manner? Sharing a common vertex and concentric in
> > terms of angle, or sharing a common angle and concentric in terms of
> > vertex and base?
> >
> > Peter Popov
> > ICQ: 15002700


Post a reply to this message

From: Peter Popov
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 08:28:57
Message: <FK0yOJfwhr=b31Q=MNnpeMuBacT5@4ax.com>
I wrote,
>> Concetric in what manner? Sharing a common vertex and concentric in
>> terms of angle, or sharing a common angle and concentric in terms of
>> vertex and base?

And on Wed, 17 Nov 1999 12:59:31 +0200, you wrote:

>The latter.
>
>Margus

So, what parameters will you need? Vertex1, Vertex2 (vectors), Radius1
and Radius2 (floats), right? Maybe just Radius1 and Radius2, with
vertices 1 and 2 being <0,0,0> and <0,1,0> resp. I will think about
that.


Peter Popov
ICQ: 15002700


Post a reply to this message

From: Margus Ramst
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 08:37:54
Message: <3832B054.7F2551EA@peak.edu.ee>
Hmm... No.
I mean something like the wood pattern, which is basically concentric cylinders.
Imagine a stack of cones, all having the same XZ axis and vertex angle, but each
uniformly scaled larger than than the previous one. This is basically how real
woodgrain is structured.
I hope this explains what I need...

Margus

Gilles Tran wrote:
> 
> Still not sure to fully understand what you need, but would something like
> this work ?


Post a reply to this message

From: Margus Ramst
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 08:50:48
Message: <3832B35D.4916D41E@peak.edu.ee>
I would imagine that none of this is necessary, really. Preferably, this should
be an infinitely looping pattern, with the tip of the cones tapering to a point,
and the cones themselves extending into infinity. The vertex angle might make
things more convenient, but everythig can be adjusted by scaling.
I re-iterate, I would use this function for a pattern, not some finite object.

Margus

Peter Popov wrote:
> 
> I wrote,
> >> Concetric in what manner? Sharing a common vertex and concentric in
> >> terms of angle, or sharing a common angle and concentric in terms of
> >> vertex and base?
> 
> And on Wed, 17 Nov 1999 12:59:31 +0200, you wrote:
> 
> >The latter.
> >
> >Margus
> 
> So, what parameters will you need? Vertex1, Vertex2 (vectors), Radius1
> and Radius2 (floats), right? Maybe just Radius1 and Radius2, with
> vertices 1 and 2 being <0,0,0> and <0,1,0> resp. I will think about
> that.
> 
> Peter Popov
> ICQ: 15002700


Post a reply to this message

From: Gilles Tran
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 09:15:58
Message: <3832B897.5BCA2F08@inapg.inra.fr>
What I still have trouble figuring out is the kind of pattern you expect to see when
applied to an object, and how it would be different from regular wood, or onion, or
even spherical. Perhaps you could hand-draw something and post it in binaries ???
G.

Margus Ramst wrote:

> Hmm... No.
> I mean something like the wood pattern, which is basically concentric cylinders.
> Imagine a stack of cones, all having the same XZ axis and vertex angle, but each
> uniformly scaled larger than than the previous one. This is basically how real
> woodgrain is structured.
> I hope this explains what I need...
>
> Margus
>
> Gilles Tran wrote:
> >
> > Still not sure to fully understand what you need, but would something like
> > this work ?


Post a reply to this message

From: Nieminen Juha
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 09:26:43
Message: <3832bb23@news.povray.org>
After _LOTS_ of thinking I got a really short answer:

  Given an aperture angle 'Angle' for the cone and a point 'p' in space,
the color for that point is:

-sin(Angle)*abs(p.x)+cos(Angle)*vlength(<p.y,p.z>)

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Nieminen Juha
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 09:29:12
Message: <3832bbb8@news.povray.org>
(Of course if you need a value between 0 and 1 you have to clamp the value
returned by that function; I don't know how isosurface functions work but
I suppose that they do the clamping by themselves when calculating
pigments.)

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Nieminen Juha
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 09:58:36
Message: <3832c29c@news.povray.org>
Nieminen Juha <war### [at] punarastascstutfi> wrote:
: -sin(Angle)*abs(p.x)+cos(Angle)*vlength(<p.y,p.z>)

  Btw, if there's no vlength()-function available, this achieves the same
thing:

-sin(Angle)*abs(p.x)+cos(Angle)*sqrt(p.y*p.y+p.z*p.z)

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 15:39:00
Message: <38331317.96986E3@compuserve.com>
This might be close to what you want, they aren't exactly concentric,
more like stacked:
box  {< -5, -5,  0>, < 5, 5, 5 >
 texture {
  pigment {
   function {sqrt(x^2 + z^2)-y}
   color_map {
    [0 color Black]
    [1 color White]
   }
  }
 }
}


Post a reply to this message

From: Margus Ramst
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 15:46:46
Message: <383314DC.8C5BA3F1@peak.edu.ee>
Thanks, but Netscape plays tricks on me...
Could you repost your previous message, I cannot see it.
Apparently there are 2 other new messages from around the same time that I can't
see (groups pane shows 3 unread messages, but not so the message pane). Weird.

Margus

Nieminen Juha wrote:
> 
> Nieminen Juha <war### [at] punarastascstutfi> wrote:
> : -sin(Angle)*abs(p.x)+cos(Angle)*vlength(<p.y,p.z>)
> 
>   Btw, if there's no vlength()-function available, this achieves the same
> thing:
> 
> -sin(Angle)*abs(p.x)+cos(Angle)*sqrt(p.y*p.y+p.z*p.z)
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Margus Ramst
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 15:51:58
Message: <38331615.D74C19A5@peak.edu.ee>
Thank you, I think this is just about it.

Margus

Chris Huff wrote:
> 
> This might be close to what you want, they aren't exactly concentric,
> more like stacked:
> box  {< -5, -5,  0>, < 5, 5, 5 >
>  texture {
>   pigment {
>    function {sqrt(x^2 + z^2)-y}
>    color_map {
>     [0 color Black]
>     [1 color White]
>    }
>   }
>  }
> }


Post a reply to this message

From: Ken
Subject: Re: Req: isosurface function
Date: 17 Nov 1999 19:19:07
Message: <383345BB.4D1E1224@pacbell.net>
When you posted this message Warps content was included. I don't know what
you are doing wrong sir.

Margus Ramst wrote:
> 
> Thanks, but Netscape plays tricks on me...
> Could you repost your previous message, I cannot see it.
> Apparently there are 2 other new messages from around the same time that I can't
> see (groups pane shows 3 unread messages, but not so the message pane). Weird.
> 
> Margus
> 
> Nieminen Juha wrote:
> >
> > Nieminen Juha <war### [at] punarastascstutfi> wrote:
> > : -sin(Angle)*abs(p.x)+cos(Angle)*vlength(<p.y,p.z>)
> >
> >   Btw, if there's no vlength()-function available, this achieves the same
> > thing:
> >
> > -sin(Angle)*abs(p.x)+cos(Angle)*sqrt(p.y*p.y+p.z*p.z)
> >
> > --
> > main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> > ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Nieminen Juha
Subject: Re: Req: isosurface function
Date: 18 Nov 1999 10:31:21
Message: <38341bc9@news.povray.org>
After _LOTS_ of thinking I got a really short answer:

  Given an aperture angle 'Angle' for the cone and a point 'p' in space,
the color for that point is:

 -sin(Angle)*abs(p.x)+cos(Angle)*sqrt(p.y*p.y+p.z*p.z)


-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Nieminen Juha
Subject: Re: Req: isosurface function
Date: 18 Nov 1999 10:32:41
Message: <38341c19@news.povray.org>
Margus Ramst <mar### [at] peakeduee> wrote:
: Thank you, I think this is just about it.

  Could you please check my suggestion too so that I would not feel as doing
lots of thinking work for nothing? Thanks :)

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Margus Ramst
Subject: Re: Req: isosurface function
Date: 18 Nov 1999 16:43:25
Message: <383473A5.371BBA02@peak.edu.ee>
Nieminen Juha wrote:
> 
>   After _LOTS_ of thinking I got a really short answer:
> 
>   Given an aperture angle 'Angle' for the cone and a point 'p' in space,
> the color for that point is:
> 
>  -sin(Angle)*abs(p.x)+cos(Angle)*sqrt(p.y*p.y+p.z*p.z)
> 

Thank you. It works well, with just one problem: the pattern is mirrored along
the XY plane. I'll try to use my own brains to fix this :)

Margus


Post a reply to this message

From: Margus Ramst
Subject: Re: Req: isosurface function
Date: 18 Nov 1999 16:43:45
Message: <383473B8.BEED277B@peak.edu.ee>
Yes, but I can't see the message (his own) that he quoted in this post.
Sir still doesn't know whats wrong.

Margus

Ken wrote:
> 
> When you posted this message Warps content was included. I don't know what
> you are doing wrong sir.
>


Post a reply to this message

From: Ken
Subject: Re: Req: isosurface function
Date: 18 Nov 1999 17:15:47
Message: <38347A58.9ED1FB72@pacbell.net>
Margus Ramst wrote:

> I'll try to use my own brains to fix this :)

Sounds like stormy weather ahead...

:)

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

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