POV-Ray : Newsgroups : povray.newusers : Import of measurement data (ASCII format) in animation : Re: Import of measurement data (ASCII format) in animation Server Time
26 Apr 2024 02:06:00 EDT (-0400)
  Re: Import of measurement data (ASCII format) in animation  
From: Alain
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

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