POV-Ray : Newsgroups : povray.advanced-users : How to use a bezier-curve (2D) for a function to use in a texture? : Re: How to use a bezier-curve (2D) for a function to use in a texture? Server Time
28 Jul 2024 16:32:18 EDT (-0400)
  Re: How to use a bezier-curve (2D) for a function to use in a texture?  
From: Scott Gammans
Date: 14 Sep 2004 09:53:21
Message: <4146F7D0.20205@yahoo.com>
David:

Take a look at the functions that Tor Olav Kristensen posted in the 
thread I started above (the one about bezier splines missing from the 
spline{} object in POV-Ray).

I was looking for a way to sweep spheres along a bezier spline, and his 
functions work perfectly, but one of the nice side-benefits is that his 
functions also calculate the u-v coordinates of a bezier spline at any 
point *along* the spline. It sounds like that might be what you're 
looking for...

-----
Scott Gammans
Washington, DC


David Wallace wrote:
> I want that function, too, but for a different purpose.  If I could
> calculate the distance from a 2D-point in space to the nearest point on a
> bezier spline,  I would be drawing rivers and streams in landscapes.  I
> suspect the math would be rather egregious, though.
> 
> "D. H. Berlin" <wee### [at] PoVStefaniede> wrote in message
> news:web.41427fd3c601232d88e4a61c0@news.povray.org...
> 
>>Hi!
>>
>>I don't have to much knowledge about the math I need. So I hope my
>>explanation what I want to achieve is right.
>>
>>I want to use a curve-function (f.e. a cubic-bezier) which is defined
>>through points laying in the x,y-plane (2D-curve) in a function for a
>>texture. Where the curve runs, the function should give back 1 and it
>>should have a fallof described through a factor f (fallof maybe like when
>>using an airbrush) so the function gives back 0 when the texture-point to
>>be calculated is away  f.e. 0.01 povray-units.
>>
>>If 1 povray-unit would be 1 meter, this function should draw a texture
> 
> which
> 
>>would be a line defined by the points of the bezier-curve and a fallof to
> 
> 0
> 
>>in a distance of 0.01 units to both side of the curve.
>>
>>The goal would be, that one could just draw text using a bezier-curve for
> 
> a
> 
>>letter in a program, export the points, and by just putting the point-list
>>in to the povray-function could use the drawn-text as texture.
>>
>>I hope it's not do difficult.
>>
>>Greetings
>>Dieter
>>
>>
> 
> 
>


Post a reply to this message

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