POV-Ray : Newsgroups : povray.newusers : Import of measurement data (ASCII format) in animation : Re: Import of measurement data (ASCII format) in animation Server Time
18 Apr 2024 12:04:13 EDT (-0400)
  Re: Import of measurement data (ASCII format) in animation  
From: JorgeAE
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

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