POV-Ray : Newsgroups : povray.advanced-users : Bicubic patch macro Server Time
29 Jul 2024 18:19:24 EDT (-0400)
  Bicubic patch macro (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Rune
Subject: Re: Bicubic patch macro
Date: 10 Feb 2002 14:47:56
Message: <3c66ce6c@news.povray.org>
Never mind, I think I've just seen the light.

It was on this page:
http://www.gamedev.net/reference/articles/article1584.asp

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Jan 20)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Dave Dunn
Subject: Re: Bicubic patch macro
Date: 10 Feb 2002 15:05:51
Message: <3C66D2FE.C6884FF@aol.com>
Rune wrote:

> I'm interested in knowing more about how bicubic patches work, so that I can
> maybe make some macros that can extent the things possible to do with
> bicubic patches.

Please see my recent posts in p.t.s-f


Post a reply to this message

From: Rune
Subject: Re: Bicubic patch macro
Date: 10 Feb 2002 16:25:07
Message: <3c66e533@news.povray.org>
I wrote:
> Never mind, I think I've just seen the light.
>
> It was on this page:
> http://www.gamedev.net/reference/articles/article1584.asp

But still thanks to Ingo and Warp. Now I have both the theory and some
working examples. :)

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Jan 20)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Rune
Subject: Re: Bicubic patch macro
Date: 10 Feb 2002 16:30:37
Message: <3c66e67d@news.povray.org>
"Dave Dunn" wrote:
> Rune wrote:
>
> > I'm interested in knowing more about how bicubic
> > patches work, so that I can maybe make some macros
> > that can extent the things possible to do with
> > bicubic patches.
>
> Please see my recent posts in p.t.s-f

???

As far as I can see those don't do anything like what I requested.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Jan 20)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: bob h
Subject: Re: Bicubic patch macro
Date: 10 Feb 2002 19:48:28
Message: <3c6714dc@news.povray.org>
"Rune" <run### [at] mobilixnetdk> wrote in message
news:3c66e67d@news.povray.org...
> "Dave Dunn" wrote:
> >
> > Please see my recent posts in p.t.s-f
>
> As far as I can see those don't do anything like what I requested.

Hmmm, if Dave hadn't pointed his files out I would have.  Sounded just ike
the thing you were asking to me too.  Creates a bicubic_patch by macro and
places wireframe for it.  You going to make a triangle mesh from the patch?
I'd think that would work out by replacing the wireframe with triangles
maybe.

Admittedly, I haven't seen the others mentioned already.

bob h


Post a reply to this message

From: Rune
Subject: Re: Bicubic patch macro
Date: 10 Feb 2002 20:12:23
Message: <3c671a77@news.povray.org>
"bob h" wrote:
> Hmmm, if Dave hadn't pointed his files out I would have.
> Sounded just like the thing you were asking to me too.
> Creates a bicubic_patch by macro and places wireframe for it.

A bicubic patch AKA a bezier patch is a mathematically defined surface that
is used in many other programs than POV-Ray.

I wanted to create a bicubic patch surface using a *mesh*, not using the
build-in bicubic patch object in POV-Ray. This is because I wanted to know
how bicubic patches work at a low level.

That's what I meant and that's what I wrote, but I could have made it more
clear I guess.

Anyway, thanks for your good intentions Dave an Bob!

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Jan 20)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Ron Parker
Subject: Re: Bicubic patch macro
Date: 10 Feb 2002 21:04:05
Message: <slrna6e9kp.igb.ron.parker@fwi.com>
On Mon, 11 Feb 2002 02:12:26 +0100, Rune wrote:
> I wanted to create a bicubic patch surface using a *mesh*, not using the
> build-in bicubic patch object in POV-Ray. This is because I wanted to know
> how bicubic patches work at a low level.

As you know, one of the methods that already exists for bicubic patches 
turns them into meshes, so you could look at the source code for POV 
itself to see how this is done.

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Chris Colefax
Subject: Re: Bicubic patch macro
Date: 11 Feb 2002 03:44:41
Message: <3c678479@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   Colefax's PCM macros can place objects on the surface of a bicubic
patch.
> Thus it should be rather easy to adapt it to calculate vertex point on the
> surface of the bicubic patch.

Funnily enough, the pcm.mcr file contains a macro called
PCM_get_patch_point, that takes an array of 16 bezier-patch control points
and a U, V coordinate, and returns a point on the patch's surface
accordingly.  There's also a macro that will convert the control points into
a grid of surface points of arbitrary resolution, and (of course!) the
source for all these calculations is freely available.


Post a reply to this message

From: Rune
Subject: Re: Bicubic patch macro
Date: 11 Feb 2002 04:57:53
Message: <3c6795a1@news.povray.org>
"Ron Parker" wrote:
> As you know, one of the methods that already exists
> for bicubic patches turns them into meshes

Yes I know.

> so you could look at the source code for POV
> itself to see how this is done.

Not very easy when I don't know C I imagine and for that same reason I don't
have the source code lying around. Is it generally simple enough to learn
from the source code even though you don't know C (or C++ for that matter)?

Anyway, as mentioned, I found some other ways to learn about it.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Jan 20)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Josh English
Subject: Re: Bicubic patch macro
Date: 22 Feb 2002 14:44:13
Message: <3C769F8B.5722DFE1@spiritone.com>
Take a look at 

http://www.spiritone.com/~english/cyclopedia/patches.html

With my experiences here it seems that it uses the 16 control points and
calculates mesh positions along 8 different bezier splines. 

Josh English
eng### [at] spiritonecom
http://www.spiritone.com/~english


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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