POV-Ray : Newsgroups : povray.newusers : Import of measurement data (ASCII format) in animation Server Time
27 Dec 2024 11:04:30 EST (-0500)
  Import of measurement data (ASCII format) in animation (Message 1 to 10 of 34)  
Goto Latest 10 Messages Next 10 Messages >>>
From: JorgeAE
Subject: Import of measurement data (ASCII format) in animation
Date: 25 Feb 2016 07:20:00
Message: <web.56cef0b1bc80f3839e6517f30@news.povray.org>
Hi!
My name is Jorge. I started using POV-Ray a couple of days ago, so I am actually
a not very experienced POV-Ray user

I have a question regarding an animation which is supposed to reproduce the
vibration of a metal plate, that was taken at six different points of the
plate. The measured values are available in ASCII format.

So far, I know how to define a simple geometry (scene) and start an animation
with the help of the "clock" command. However, my task is to design a metal
plate which vibrates according to the vibration values taken at the 6 different
points of the plate mentioned before. For this reason, I am actually supposed to
import the vibration data to my POV-Ray code and assign it to 6 points in my
geometry.

I don't know how this should be implemented and have not found any similar
example in the web, so I it would be great if someone could give some ideas or
tips on how to do it.

Thank you very much!
Jorge


Post a reply to this message

From: Stephen
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 25 Feb 2016 07:58:55
Message: <56cefa8f$1@news.povray.org>
On 2/25/2016 12:17 PM, JorgeAE wrote:
> Hi!
> My name is Jorge. I started using POV-Ray a couple of days ago, so I am actually
> a not very experienced POV-Ray user
>
> I have a question regarding an animation which is supposed to reproduce the
> vibration of a metal plate, that was taken at six different points of the
> plate. The measured values are available in ASCII format.
>
> So far, I know how to define a simple geometry (scene) and start an animation
> with the help of the "clock" command. However, my task is to design a metal
> plate which vibrates according to the vibration values taken at the 6 different
> points of the plate mentioned before. For this reason, I am actually supposed to
> import the vibration data to my POV-Ray code and assign it to 6 points in my
> geometry.
>
> I don't know how this should be implemented and have not found any similar
> example in the web, so I it would be great if someone could give some ideas or
> tips on how to do it.
>
> Thank you very much!
> Jorge
>
>
>

Hi Jorge and welcome.

You could use triangles to build your metal plate.
With only 6 data points you could do that manually. If you had more you 
could build a mesh.

You could define the data points as an array and read the values from a 
file.

Help sections.
3.3.1.10 Array

3.4.5.2.3 Mesh
3.4.5.2.6 Triangle

3.3.2.3 File I/O Directives


-- 

Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 25 Feb 2016 12:22:50
Message: <56cf386a$1@news.povray.org>
Le 16-02-25 07:58, Stephen a écrit :
> On 2/25/2016 12:17 PM, JorgeAE wrote:
>> Hi!
>> My name is Jorge. I started using POV-Ray a couple of days ago, so I
>> am actually
>> a not very experienced POV-Ray user
>>
>> I have a question regarding an animation which is supposed to
>> reproduce the
>> vibration of a metal plate, that was taken at six different points of the
>> plate. The measured values are available in ASCII format.
>>
>> So far, I know how to define a simple geometry (scene) and start an
>> animation
>> with the help of the "clock" command. However, my task is to design a
>> metal
>> plate which vibrates according to the vibration values taken at the 6
>> different
>> points of the plate mentioned before. For this reason, I am actually
>> supposed to
>> import the vibration data to my POV-Ray code and assign it to 6 points
>> in my
>> geometry.
>>
>> I don't know how this should be implemented and have not found any
>> similar
>> example in the web, so I it would be great if someone could give some
>> ideas or
>> tips on how to do it.
>>
>> Thank you very much!
>> Jorge
>>
>>
>>
>
> Hi Jorge and welcome.
>
> You could use triangles to build your metal plate.
> With only 6 data points you could do that manually. If you had more you
> could build a mesh.
>
> You could define the data points as an array and read the values from a
> file.
>
> Help sections.
> 3.3.1.10 Array
>
> 3.4.5.2.3 Mesh
> 3.4.5.2.6 Triangle
>
> 3.3.2.3 File I/O Directives
>
>


Once the triangles are defined, making them into a mesh is very easy. 
Just add "mesh{" before your triangles and a "}" after. That's all there 
is to do.

If you plan of having multiple views of your plate in a single scene, 
this is the way to go.
First define your plate as an object:
Use "#declare Plate = mesh{ Your_Triangles}

Next, place your plate at various locations and orientations:
object{Plate rotate <-5,0,0> translate <0,10,0>}
object{Plate rotate <0,60,0> translate <17,-3,0>}
object{Plate rotate <90,0,60> translate <-17,-3,0>}

This will gives you 3 different views of your plate.


Alain


Post a reply to this message

From: scott
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 26 Feb 2016 06:47:28
Message: <56d03b50$1@news.povray.org>
> I have a question regarding an animation which is supposed to reproduce the
> vibration of a metal plate, that was taken at six different points of the
> plate. The measured values are available in ASCII format.
>
> So far, I know how to define a simple geometry (scene) and start an animation
> with the help of the "clock" command. However, my task is to design a metal
> plate which vibrates according to the vibration values taken at the 6 different
> points of the plate mentioned before. For this reason, I am actually supposed to
> import the vibration data to my POV-Ray code and assign it to 6 points in my
> geometry.

I would read in all the points from the ASCII file to an array first. 
Look up "#read" and "array" in the help, you should be able to figure 
out how to do it.

Then, you can choose which value to use from the array based on the 
"clock" value.

Once you've got that working, you might then want to experiment with 
doing some kind of linear interpolation between frames to get a smoother 
animation.


Post a reply to this message

From: JorgeAE
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 26 Feb 2016 08:20:00
Message: <web.56d04f85a405651bb52369120@news.povray.org>
Alain <kua### [at] videotronca> wrote:
> Le 16-02-25 07:58, Stephen a écrit :
> > On 2/25/2016 12:17 PM, JorgeAE wrote:
> >> Hi!
> >> My name is Jorge. I started using POV-Ray a couple of days ago, so I
> >> am actually
> >> a not very experienced POV-Ray user
> >>
> >> I have a question regarding an animation which is supposed to
> >> reproduce the
> >> vibration of a metal plate, that was taken at six different points of the
> >> plate. The measured values are available in ASCII format.
> >>
> >> So far, I know how to define a simple geometry (scene) and start an
> >> animation
> >> with the help of the "clock" command. However, my task is to design a
> >> metal
> >> plate which vibrates according to the vibration values taken at the 6
> >> different
> >> points of the plate mentioned before. For this reason, I am actually
> >> supposed to
> >> import the vibration data to my POV-Ray code and assign it to 6 points
> >> in my
> >> geometry.
> >>
> >> I don't know how this should be implemented and have not found any
> >> similar
> >> example in the web, so I it would be great if someone could give some
> >> ideas or
> >> tips on how to do it.
> >>
> >> Thank you very much!
> >> Jorge
> >>
> >>
> >>
> >
> > Hi Jorge and welcome.
> >
> > You could use triangles to build your metal plate.
> > With only 6 data points you could do that manually. If you had more you
> > could build a mesh.
> >
> > You could define the data points as an array and read the values from a
> > file.
> >
> > Help sections.
> > 3.3.1.10 Array
> >
> > 3.4.5.2.3 Mesh
> > 3.4.5.2.6 Triangle
> >
> > 3.3.2.3 File I/O Directives
> >
> >
>
>
> Once the triangles are defined, making them into a mesh is very easy.
> Just add "mesh{" before your triangles and a "}" after. That's all there
> is to do.
>
> If you plan of having multiple views of your plate in a single scene,
> this is the way to go.
> First define your plate as an object:
> Use "#declare Plate = mesh{ Your_Triangles}
>
> Next, place your plate at various locations and orientations:
> object{Plate rotate <-5,0,0> translate <0,10,0>}
> object{Plate rotate <0,60,0> translate <17,-3,0>}
> object{Plate rotate <90,0,60> translate <-17,-3,0>}
>
> This will gives you 3 different views of your plate.
>
>
> Alain

Hello Stephen and Alain,

thank you very much for your answers, both of them were very helpfull!! I now
created my plate and defined and array with six elements, in which each array's
element is a data point (measurement point).

Unfortunately I was still not able to solve the problem completely. I am not
sure how the animation should be implemented:
Since the ASCII files, I want to get the data from, contain the measurement data
registered in seven columns (a sort of timestamp and the six measured vibration
signals), I thought of using a linear spline curve (the plate vibrates only in
the z-direction). I would then assign the values in each of the six columns to
each data point in my mesh. In this way, the vibration values would describe the
path of the spline curve. Could this actually work? How would the syntax look
like?
By assigning a spline curve to each data point I will be trying to animate the
movement of a point and not an object, is this actually possible?

Thank you in advance for your help!

Regards
Jorge


Post a reply to this message

From: Stephen
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 26 Feb 2016 09:07:14
Message: <56d05c12@news.povray.org>
On 2/26/2016 1:15 PM, JorgeAE wrote:
> Alain <kua### [at] videotronca> wrote:
>> Le 16-02-25 07:58, Stephen a écrit :
>>> On 2/25/2016 12:17 PM, JorgeAE wrote:
>>>> Hi!
>>>> My name is Jorge. I started using POV-Ray a couple of days ago, so I
>>>> am actually
>>>> a not very experienced POV-Ray user
>>>>
>>>> I have a question regarding an animation which is supposed to
>>>> reproduce the
>>>> vibration of a metal plate, that was taken at six different points of the
>>>> plate. The measured values are available in ASCII format.
>>>>
>>>> So far, I know how to define a simple geometry (scene) and start an
>>>> animation
>>>> with the help of the "clock" command. However, my task is to design a
>>>> metal
>>>> plate which vibrates according to the vibration values taken at the 6
>>>> different
>>>> points of the plate mentioned before. For this reason, I am actually
>>>> supposed to
>>>> import the vibration data to my POV-Ray code and assign it to 6 points
>>>> in my
>>>> geometry.
>>>>
>>>> I don't know how this should be implemented and have not found any
>>>> similar
>>>> example in the web, so I it would be great if someone could give some
>>>> ideas or
>>>> tips on how to do it.
>>>>
>>>> Thank you very much!
>>>> Jorge
>>>>
>>>>
>>>>
>>>
>>> Hi Jorge and welcome.
>>>
>>> You could use triangles to build your metal plate.
>>> With only 6 data points you could do that manually. If you had more you
>>> could build a mesh.
>>>
>>> You could define the data points as an array and read the values from a
>>> file.
>>>
>>> Help sections.
>>> 3.3.1.10 Array
>>>
>>> 3.4.5.2.3 Mesh
>>> 3.4.5.2.6 Triangle
>>>
>>> 3.3.2.3 File I/O Directives
>>>
>>>
>>
>>
>> Once the triangles are defined, making them into a mesh is very easy.
>> Just add "mesh{" before your triangles and a "}" after. That's all there
>> is to do.
>>
>> If you plan of having multiple views of your plate in a single scene,
>> this is the way to go.
>> First define your plate as an object:
>> Use "#declare Plate = mesh{ Your_Triangles}
>>
>> Next, place your plate at various locations and orientations:
>> object{Plate rotate <-5,0,0> translate <0,10,0>}
>> object{Plate rotate <0,60,0> translate <17,-3,0>}
>> object{Plate rotate <90,0,60> translate <-17,-3,0>}
>>
>> This will gives you 3 different views of your plate.
>>
>>
>> Alain
>
> Hello Stephen and Alain,
>
> thank you very much for your answers, both of them were very helpfull!! I now
> created my plate and defined and array with six elements, in which each array's
> element is a data point (measurement point).
>
> Unfortunately I was still not able to solve the problem completely. I am not
> sure how the animation should be implemented:
> Since the ASCII files, I want to get the data from, contain the measurement data
> registered in seven columns (a sort of timestamp and the six measured vibration
> signals), I thought of using a linear spline curve (the plate vibrates only in
> the z-direction). I would then assign the values in each of the six columns to
> each data point in my mesh. In this way, the vibration values would describe the
> path of the spline curve. Could this actually work? How would the syntax look
> like?

I won't attempt to write any code as I use a modeller.
You might not be aware that you can use frame_number instead of the 
clock variable.
If the timestamps are are linearly spaced you can use one per frame. 
That might simplify things.



> By assigning a spline curve to each data point I will be trying to animate the
> movement of a point and not an object, is this actually possible?
>

Yes, that is right but it might be a good idea to experiment. Remember 
to create things at the origin then translate them to where you want 
them. You can lose object if you don't and rotate them.




-- 

Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 26 Feb 2016 11:25:15
Message: <56d07c6b@news.povray.org>


>
> Hello Stephen and Alain,
>
> thank you very much for your answers, both of them were very helpfull!! I now
> created my plate and defined and array with six elements, in which each array's
> element is a data point (measurement point).
>
> Unfortunately I was still not able to solve the problem completely. I am not
> sure how the animation should be implemented:
> Since the ASCII files, I want to get the data from, contain the measurement data
> registered in seven columns (a sort of timestamp and the six measured vibration
> signals), I thought of using a linear spline curve (the plate vibrates only in
> the z-direction). I would then assign the values in each of the six columns to
> each data point in my mesh. In this way, the vibration values would describe the
> path of the spline curve. Could this actually work? How would the syntax look
> like?
> By assigning a spline curve to each data point I will be trying to animate the
> movement of a point and not an object, is this actually possible?
>
> Thank you in advance for your help!
>
> Regards
> Jorge
>
>
If you want to get one frame per data set, you can read them into an 
array, then use "frame_number" to get the specefic ones for the current 
frame.

If you use splines, then you use the "time stamp" as indices to define 
the controle points of the splines. You'll need 6 one dimentional 
splines. It looks like this within a given spline:
[Time	Point]

I recomend that you use the natural spline. It gives smooth curves 
between your points.

Next, you multiply the clock variable by the largest time stamp value 
and use that to "travel" in the splines. The syntax is the same as for 
an array, except that you now can use floats instead of only integers.

This allow you to have an animation with a number of frames that may 
differ from the number of mesurements.



Alain


Post a reply to this message

From: Bald Eagle
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 26 Feb 2016 17:45:01
Message: <web.56d0d487a405651b664116940@news.povray.org>
I'd say that if you have six points on a solid plate, then you may want to
"build" your plate with splines as well, so that you get a smooth curvature from
the edges of the plate to the measured points, as well as the spaces in between.

Bear in mind that you'll need "extra" points as control points for your splines.

I would suggest creating something simple, like a sphere sweep, that uses only
one of the columns of vibration data, as a means to write some SDL code, get a
good looking scene, and produce a working animation.

After you've accomplished something concrete, then you can begin to expand and
add more complicated features to your file (make a copy so that you have the
original saved as a reference) and it won't be so difficult to try to "do it all
at once"

You can always post your WIPs (Works in Progress) and SDL in the appropriate
sections as attachments so that we can see exactly what you're trying to do and
see where any difficult spots and hard-to-spot errors may be.

Welcome to the POV-Ray forums, and good luck    :)


Post a reply to this message

From: Bald Eagle
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 26 Feb 2016 18:10:01
Message: <web.56d0da3aa405651b664116940@news.povray.org>
Just a few things I found that might help you out / interest you.
(cymatics / chladni plates)

http://news.povray.org/povray.binaries.images/thread/%3C3e85f01f%40news.povray.org%3E/

http://manfredkraft.blogspot.com/2016/01/biorhythm-cymatics-23.html

https://www.youtube.com/watch?v=ATErEWDajvw

http://paulbourke.net/geometry/chladni/


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Import of measurement data (ASCII format) in animation
Date: 27 Feb 2016 17:57:59
Message: <56d229f7@news.povray.org>
On 26.02.2016 23:41, Bald Eagle wrote:
>
> I'd say that if you have six points on a solid plate, then you may want to
> "build" your plate with splines as well

Objects of interest here might be "prism" (for 1d profile of vibration)
or "bicubic_patch" (for 2d plate animation)


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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