POV-Ray : Newsgroups : povray.advanced-users : Smooth, continuous Bezier splines (again) Server Time
5 Feb 2025 18:12:19 EST (-0500)
  Smooth, continuous Bezier splines (again) (Message 21 to 23 of 23)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: ingo
Subject: Re: Smooth, continuous Bezier splines (again)
Date: 30 Jan 2025 10:10:00
Message: <web.679b962a96675d9f17bac71e8ffb8ce3@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

>
> "What does Fn_RabbitHole () do?  I can't find it in the docs . . ."

Dig. Dig deeper.


Yes, SDL is slow when one cannot use functions. This is why I implemented the
meshmakermacros and the curves in Nim, but have not married them.

https://gist.github.com/ingoogni/490d2d50710bab4fe5e689714e9ef287

for mesh it is easy, generate and use, for splines it realy depends on the use,

ingo


Post a reply to this message

From: Bald Eagle
Subject: Re: Smooth, continuous Bezier splines (again)
Date: 30 Jan 2025 17:35:00
Message: <web.679bfd9d96675d9f1f9dae3025979125@news.povray.org>
That approach was also close to what I was doing, however it doesn't match the
curvature of the spline segments at the endpoints.

Visually, it still looked too flat-then rounded-then flat-then rounded....

Although I didn't pore over your code yet, I quickly skimmed it to see where the
control points were calculated, and then bolted on my curvature comb code to
visualize the curvature over all of the spline segments.

You can see where the mismatches are.

So I still think I have to degree elevate and then I can mirror the additional
control points to get the curvature to match.

(Also, FYI: the point/tip is actually a hard point.  So 2 separate composite
splines - 1 on the left and 1 on the right)

I'll see if I have enough time to patch in my degree elevation code and extend
the control-point mirroring that one extra "level" into the splines.

- BW


Post a reply to this message


Attachments:
Download 'tok spline curvature.png' (160 KB)

Preview of image 'tok spline curvature.png'
tok spline curvature.png


 

From: Leroy
Subject: Re: Smooth, continuous Bezier splines (again)
Date: 1 Feb 2025 14:50:00
Message: <web.679e79e196675d9f65a8eed3f712fc00@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I've got a diagram of where measured points should be along a CURVE that
> describes the profile of a solid edge.

 I came late to this, After I reading all the other inputs, I thought I'd throw
my two cents in. I wrote a win program a long time ago to make prisms and
polygons for POV. PolPrm.exe it's at http://leroyw.byethost15.com with the rest
of my window program I wrote for POV.

I wrote in mainly so I could switch the between different types of prisms and
polygons as needed. It started as a simple project with limited options and a
small working area. After using for it awhile I started adding things to make
life easier. I put in a few predefined shapes, set it so I could dump the data
into an array file, and a bunch of little things.
 The last time I upgraded, it started because someone in this forum wanted to
know how to make a circle out of a prism. I'd like to have that in PolPrm. So
after figuring out how to make the circle, I went on a building spree. I add
more curve shapes, made it where can split a shape in two, combine two shapes
into one,and finally made the long over due undo function. I swore that this was
the last upgrade.
 When I saw your shape I said 'that would fit nicely in PolPrm'. You see PolPrm
still has a small working area 2*2 pov units square. Then reading all the
messages it seamed that what you wanted is the math or a least the conversation
went that way. But I went ahead and put a shape similar to yours in PolPrm and
play around with it. That's when I realize PolPrm wasn't really made for
precision. It make custom shapes very well.
 Another thing I learned after reading all this forum messages is that the real
reason I wrote PolPrm is that I didn't want to the math every time  I made a
prism.

Have Fun!


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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