POV-Ray : Newsgroups : povray.newusers : Import of measurement data (ASCII format) in animation Server Time
30 Apr 2024 22:26:48 EDT (-0400)
  Import of measurement data (ASCII format) in animation (Message 15 to 24 of 34)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Stephen
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 2 Mar 2016 11:32:26
Message: <56d7159a$1@news.povray.org>
On 3/2/2016 4:06 PM, Bald Eagle wrote:
> If you could attach a copy of your data set, and maybe a diagram of the location
> of the points on the plate, it would be easier understand the full scope, and to
> head off anything that would need to be rewritten.

Yes, only six points. Driving me mad trying to imagine it. Are the edges 
fixed or free etc. :-)

-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 2 Mar 2016 12:35:00
Message: <web.56d72336a405651b5e7df57c0@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

> Yes, only six points. Driving me mad trying to imagine it. Are the edges
> fixed or free etc. :-)

That would affect things, and produce a different visual effect, yes.
I'm currently wondering if the vibrations are purely (co)sine waves and their
harmonics, or if there's some catenary in there...

Getting something smoothly interpolated might require functions and
isosurfaces...   the ball-and-stick/string grid would be pretty cumbersome,
although if you had a lot of splines that were defined using arrays... still
pretty ugly.  I haven't had that much coffee yet, and I'm not sure how much free
time I'd have to work all of that out...   :O

We're almost getting into Finite Element Method territory here.   {shivers}


Post a reply to this message

From: Bald Eagle
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 2 Mar 2016 13:00:01
Message: <web.56d72995a405651b5e7df57c0@news.povray.org>
Scratch all that.
Christian Froeschlin obviously has the winning idea with the bicubic_patch.

[high five!]


Post a reply to this message

From: Bald Eagle
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 2 Mar 2016 21:45:01
Message: <web.56d7a4b7a405651b5e7df57c0@news.povray.org>
Christian,

I just got done editing a lot of code to smoothly stitch together four bicubic
patches, and what I noticed is that the surface of the patches do not coincide
with the control points - which is likely how the data set would applied -
setting the control points from the values in the file.

http://news.povray.org/povray.binaries.images/attachment/%3Cweb.56d7a3881f57d665e7df57c0%40news.povray.org%3E/4smoothbi
cubicpatches%20%5Bnumgrid%20-%20side%5D.png

Is there a way to calculate where the control point needs to be given the
surface coordinate?   I seem to recall some sort of A-Frame looking diagram,
though I'll have to go dig that up and see if there's a way to back-calculate.


Post a reply to this message

From: Stephen
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 3 Mar 2016 05:54:41
Message: <56d817f1$1@news.povray.org>
On 3/2/2016 5:30 PM, Bald Eagle wrote:
> Stephen <mca### [at] aolcom> wrote:
>
>> Yes, only six points. Driving me mad trying to imagine it. Are the edges
>> fixed or free etc. :-)
>
> That would affect things, and produce a different visual effect, yes.
> I'm currently wondering if the vibrations are purely (co)sine waves and their
> harmonics, or if there's some catenary in there...
>
> Getting something smoothly interpolated might require functions and
> isosurfaces...   the ball-and-stick/string grid would be pretty cumbersome,
> although if you had a lot of splines that were defined using arrays... still
> pretty ugly.  I haven't had that much coffee yet, and I'm not sure how much free
> time I'd have to work all of that out...   :O
>
> We're almost getting into Finite Element Method territory here.   {shivers}
>
>

Damn you Moriarty! I an not going down that route. :-)

-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 3 Mar 2016 06:00:26
Message: <56d8194a$1@news.povray.org>
On 3/2/2016 5:57 PM, Bald Eagle wrote:
> Scratch all that.
> Christian Froeschlin obviously has the winning idea with the bicubic_patch.
>
> [high five!]
>
>
I don't know. I've tried it before making a water surface. As you found 
out the movement is not linear. There is also the problem with joining 
the patches together and only having six data points. Too much for my 
calcified brain. :-)

-- 

Regards
     Stephen


Post a reply to this message

From: JorgeAE
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 3 Mar 2016 07:50:01
Message: <web.56d83245a405651b7f2c2ccf0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Add these lines to the top of your file:
>
> #version 3.7;
> global_settings { assumed_gamma 1.0 }
> #include "colors.inc"


My code includes these lines, of course. I just had forgotten to copy them here
:)



>
>
> For your prism, if you are only making a square, then you only need 5 points
> instead of 7.   Your last 2 points are redundant.
>  prism {
>     linear_sweep
>     linear_spline
>     0,
>     0,
>     7,
>     <-2,-3>,<2,-3>, <2,0>, <2,3>, <-2, 3>, <-2,0>, <-2,-3>
>     pigment { Blue }
>   }

I am aware of the fact that only four different points are neccessary to define
the rectangle. The reason why I used six Points and not only four is that I
wanted to assign a spline line to each one of the six points. In that way, the
corners of the rectangle plus 2 points in the middle of both long sides would be
translated according to the (position) data I take from the Vibration file.



> If you could attach a copy of your data set, and maybe a diagram of the location
> of the points on the plate, it would be easier understand the full scope, and to
> head off anything that would need to be rewritten.
>

I uploaded three files: the vibration data as txt file, a diagram of the plate
with the real location of the measurement points and a diagram of the plate with
the measurement points located at the Corners, which corresponds to the code I
included here, where I intended to animate a "starting scenario".
(see
http://news.povray.org/povray.binaries.scene-files/thread/%3Cweb.56d82b80a405651b7f2c2ccf0%40news.povray.org%3E/)


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 3 Mar 2016 18:15:27
Message: <56d8c58f$1@news.povray.org>
On 03.03.2016 3:43, Bald Eagle wrote:

> Is there a way to calculate where the control point needs to be given the
> surface coordinate?   I seem to recall some sort of A-Frame looking diagram,
> though I'll have to go dig that up and see if there's a way to back-calculate.

I think there is not enough degrees of freedom in single patch
to do meaningful interpolation. But you might connect the reference
points in such a way that they are at corners of patches (these should
touch) and calculate inner control points for smooth transitions.

See e.g. http://www.joshuarenglish.com/cyclopedia/patches.html


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 3 Mar 2016 18:59:51
Message: <56d8cff7@news.povray.org>
> The "prism" function seemed to me a good way of modelling the plate, due to the
> given conditions in my case (1D vibration). For the animation I chose the linear
> spline curve, since I managed to make it work in other animations I tried
> before.

All you transformation does is calculate a point B from point A. It
will not affect any geometry. For that you must actually use the value
B inside the geometry instead of the literal <-2,-3> (and of course
reverse the order, calculate B before the prism).

Note using splines for that only makes sense if you need to
interpolate between measurements. If you want to render one frame
per measurement just use data point n for frame n.

Also I think you may be misinterpreting the prism. It extrudes
a 1d spline in a second dimension. It will not work if what you
have are corners + edge midpoints of a flat rectangle like this

X------X------X
|      |      |
|      |      |
X------X------X

As most simple linear geometry you could model this
with 4 triangles (or preferable a mesh2 object), as I
think you already did earlier. For a curved representation
use 2 bicubic patches that share the "middle" control points
at their corners but that is a bit more involved:

http://www.joshuarenglish.com/cyclopedia/patches.html


Post a reply to this message

From: Bald Eagle
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 3 Mar 2016 19:00:00
Message: <web.56d8cfb7a405651b5e7df57c0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> See e.g. http://www.joshuarenglish.com/cyclopedia/patches.html

I saw that, along with some of Mr. English's posts here on the forum, but I
haven't been able to do anything meaningful with it.

I might be able to get somewhere with:
https://web.archive.org/web/20131225210855/http://people.sc.fsu.edu/~jburkardt/html/bezier_interpolation.html

Got some good looking stuff coded up.   Just need to be able to have the data
points be coincident with the actual patch, and then I can put together
something that draws it all together.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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