POV-Ray : Newsgroups : povray.pov4.discussion.general : Suggest v4.0 f_bezier_2d_...() functions. (yuqk R19 v0.6.13.0) : Re: Suggest v4.0 f_bezier_2d_...() functions. (yuqk R19 v0.6.13.0) Server Time
14 Mar 2025 07:12:42 EDT (-0400)
  Re: Suggest v4.0 f_bezier_2d_...() functions. (yuqk R19 v0.6.13.0)  
From: Bald Eagle
Date: 27 Feb 2025 11:10:00
Message: <web.67c08db66d1e536f4cc51b5c25979125@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:


> :-) just...

Yes, it's a sublimely phrased complement to "All you gotta do is..."  ;)

> Thanks for posting this code. I have no feel for it at the moment, but
> would like to play. Longer term, I'll ponder the suggestions.
>
> Initial reaction is I'm unsure how to nicely handle inputs and results
> if made inbuilt today.

Not sure.  I don't play under the hood as frequently as I probably should.
And I certainly don't write things to GO under the hood (yet).
All I can think of off-the-cuff is that the current matrix <> stores FOUR 3D
vectors.  Perhaps that can be (ab)used.

> And, I doubt whether these things really need to
> be inbuilt functions? With the curves and derivatives themselves I
> wanted to be able to use them within the VM at render time.

All of this is with an eye of playing with the 48,000+ Bezier patch POV-Planet
and subdivisions.  L.O.D and various Bezier-patch debugging functions could be
useful at render time to overlay wireframe grids, make curvature-dependent
textures, interpolate colors and textures - you name it.  Can't do any of that
at render time with macros (unless we're doing the old, painful,
make-a-function-with-a-macro thing, which is also SLOOOOOOW)

> Maybe these could be shipped macros in a core include file...

They could be, but source-level methods integrated into the VM would be
something I think any good CG package would be expected to have.
Also, clipka was mentioning converting all of our text-rendering into prism {}
objects, and having an inbuilt Bezier library already implemented might be part
of making such a thing happen.
Plus, you know the POV-Ray type of experimenter - any and every feature will be
put to uses that none of us could ever expect.

Let's say that I wanted to take a sphere {} and make it into a QuadSphere made
out of Bezier patches. This would be nearly effortless if I took a circumscribed
cube and applied Bezier functions to the 4 vertices, and there were other spline
functions to solve for missing control points. (linear, spherical, etc.)

I'm just mentioning this at the present time because your mind is in this space,
you're coding that section of yuqk, and "the iron is hot".

Likely you'd have a blast doing all sorts of experiments once you had the tools
to play with.

- BW


Post a reply to this message

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