





 
 




 
 


"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Aj" <nomail@nomail> wrote:
> > I am pretty new to povray and I have the following code, ...
>
> as you're "new", I take the liberty of a couple of remarks regarding the code.
>
>
> > Here is my code:
>
> first off, it's good that you've posted an example, always helpful, I think.
>
> when rendering a scene, it pays to read povray's warnings (and pay heed ;)).
> your code should have a '#version' (often the first instruction in the scene),
> and a 'global_settings' with 'assumed_gamma'. the newer version also likes an
> 'emission 0' when you use 'ambient' in the finish.
>
> your 'union' is meant to include the sphere? (the program warns about needing
> two or more objects)
>
> try to keep things .. simple, eg there are "better" places to apply the 'Scale',
> once.
>
> since you're dealing with collections/lists of points/coords, consider using one
> or more arrays to store those. you could then, for instance, write a loop
> inside the 'sphere_sweep' declaration to "fill in" the points. (less
> duplication and editing)
>
>
> > I have been trying to do something like shown in this video:
>
> nice. hope the "Inverse Kinematics" AM pointed out will help to "get you
> there".
>
>
> regards, jr.
A tutorial to the Inverse Kinematics Neck will be very helpful as I am still a
beginner user.
Post a reply to this message


 
 




 
 


"Aj" <nomail@nomail> wrote:
> Thank you for taking the time to go through the problem.
> So basically the < x, y, z > coordinates are coming from a numerically simulated
> soft robot and the entire shape of the robot changes over time. So I was trying
> to create a spline through these points that move in the 3d space. I agree that
> the splines will be of different lengths depending on the location of control
> points but this is what I am trying to fix. As the spline represents a soft
> robot that is capable of only changing its shape keeping the length constant.
> I hope this clears some of your doubts.
The problem here is that you need to be able to create a smooth spline that you
can calculate the length of. And Cousin Ricky will tell you that calculating
the length of many mathematical curves with some sort of implicit or parametric
equation is  impossible.
What you'd probably need to do is find some numeric method to approximate the
length based on linear line segments (or just use a linear spline). Then you'd
need a way to take the softrobot control points and iteratively adjust their
positions so that they converge to a spline with a fixed length, while still
maintaining the overall correct pose of the character.
This is a raytracing forum, and the experience and expertise of the people here
is pretty random.
I would suggest that you take a good while to research approximating
curve/spline lengths, and contact people whose expertise this is. There are
graduate students, engineers, professors, CG professionals, youtubers, bloggers,
and textbook authors who could give you advice and point you in the right
direction.
Try to find people who like a graphics or coding challenge. Art of Code
(Martijn Steinrucker), Coding Train (Daniel Shiffman), Inigo Quilez (Shadertoy),
are all places I frequent to stretch my horizons and learn new and different
approaches to CG and coding problems.
Always look to see if anyone has already done this type of thing, albeit in a
different, seemingly unrelated field. You may find an academic paper, a textbook
chapter, a Graphics Gem article, or actual code posted on a website. Don't aim
for perfect  you likely just need "good 'nuff".
Post a reply to this message


 
 


From: Thomas de Groot
Subject: Re: Length of spline object changes during animation
Date: 19 Sep 2022 08:13:10
Message: <63285cd6$1@news.povray.org>



 
 


Op 1992022 om 08:48 schreef Aj:
> A tutorial to the Inverse Kinematics Neck will be very helpful as I am still a
> beginner user.
>
What you need can be found here:
https://runevision.com/3d/include/

Thomas
Post a reply to this message


 
 




 
 


"Aj" <nomail@nomail> wrote:
> So basically the < x, y, z > coordinates are coming from a numerically simulated
> soft robot and the entire shape of the robot changes over time. So I was trying
> to create a spline through these points that move in the 3d space. I agree that
> the splines will be of different lengths depending on the location of control
> points but this is what I am trying to fix. As the spline represents a soft
> robot that is capable of only changing its shape keeping the length constant.
> I hope this clears some of your doubts.
A possible way is to "resample" your found spline with n pieces of cylinder with
the same length. Think of a "swan neck" spherecylinderspherecylindersphere
etc. All depends on the smoothness you strive for.
ingo
Post a reply to this message


 
 




 

