|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
>
> 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 :)
Thank you all for your extremely useful advice!
I have been trying out some of the ideas suggested and I am now starting with
the simplest model and will expand it to a more complex and better looking one
after gaining some more experience. I just need to get to that point, where the
basic model works :).
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.
Given this, my approach consists of assigning each of the 6 points the plate is
built up of one linear spline curve generated by the vibration data. Since I
have not yet figured out how to work properly with the array definition and
reading in, I just copied a fraction of the data points from the .txt file into
my spline curve definition. Then I defined a translating vector transformation
"vtransform" along the spline curve and assigned it to a separately declared
point of the prism. Now, this sounds so simple and yet it is not working. I am
afraid, I am committing a huge mistake or omitting a "vital" aspect regarding
the sintax :/ .
It would be awesome, if you guys take a look at my (very simple) code and give
me a hint where the error is. I can't attach anything, so I have to copy my code
in here. Thank you very much in advance!
background{White}
camera {
angle 20
location <2, 10, -30>
look_at <0, 0, -1>
rotate <0,40,0>
}
light_source { <20, 20, -20> color White }
#declare P1 = <0, -3.7 >;
#declare P2 = <0, -4.3 >;
#declare P3 = <0, -3.8 >;
#declare P4 = <0, -4.1 >;
#declare P5 = <0, -3.7 >;
#declare P6 = <0, -4.1 > ;
#declare P7 = <0, -4 > ;
#declare P8 = <0, -3.7 > ;
#declare P9 = <0, -3.8 > ;
#declare P10 = <0, -3.9 >;
#declare P11 = <0, -3.8 >;
#declare P12 = <0, -3.8 >;
#declare P13 = <0, -3.8 >;
#declare P14 = <0, -3.7 >;
#declare P15 = <0, -4.2 >;
#declare P16 = <0, -3.6 >;
#declare P17 = <0, -3.6 >;
#declare P18 = <0, -3.9 >;
#declare P19 = <0, -4.2 >;
#declare P20 = <0, -3.7 >;
#declare P21 = <0, -3.8 >;
#declare Spline_1 =
spline {
linear_spline
0.00,P1,
0.05,P2,
0.10,P3,
0.15,P4,
0.20,P5,
0.25,P6,
0.30,P7,
0.35,P8,
0.40,P9,
0.45,P10,
0.50,P11,
0.55,P12,
0.60,P13,
0.65,P14,
0.70,P15,
0.75,P16,
0.80,P17,
0.85,P18,
0.90,P19,
0.95,P20,
1.00,P21,
}// end of spline ---------------
//---------------------------------------------
prism {
linear_sweep
linear_spline
0,
0,
7,
<-2,-3>,<2,-3>, <2,0>, <2,3>, <-2, 3>, <-2,0>, <-2,-3>
pigment { Blue }
}
#declare A = <-2,-3,0>;
#declare Trans1 = transform{
translate Spline_1(clock)};
#declare B = vtransform(A,Trans1);
Post a reply to this message
|
|
|
|
Add these lines to the top of your file:
#version 3.7;
global_settings { assumed_gamma 1.0 }
#include "colors.inc"
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 }
}
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'd build the "plate" as a wire mesh, using spheres as the data points, and then
maybe cylinders or sphere sweeps to connect them in a grid.
Then you could fill in the surface with triangles or smooth_triangles.
This sounds very Paul Bourke -y
Amazing stuff
http://paulbourke.net/miscellaneous/povexamples/
If you're going to make use of the clock variable, then you need to initiate
your renders with an ini file, set up for your animation.
I would suggest copying your files to a special subdirectory, since this will
generate a large collection of separate renders.
Then you need to collect all of your images into a video file so you can animate
it (or you could just use a viewer and "step" through the images one after the
other.
I use VideoMach ( http://gromada.com/videomach/ ) for most of my work.
Other people have their preferences, based on OS, etc.
Format Factory is useful for converting to other video formats.
Post a reply to this message
|
|