|
|
"Norbert Kern" <nor### [at] t-onlinede> wrote:
> Hi,
> I'm impressed, because I'm clueless how you got cylinder data out of this point
> data. I was only able to process the data like this -
Well, thanks, but my parlour trick is quite simple.
I used LibreOffice Calc to "wrap" the data points in arrays, that are collected
in the one big array.
#declare Trajectories = array [400] {
array [9] {
<0.388359, 0.155002, -5248, 0.5>,
<0.123702, -0.142302, 10, 0.5>,
<0.123548, -0.142474, 13.0554, 0.425623495431>,
<-2.19331, -3.08246, 10.8394, 0.310653718134>,
<-2.18082, -3.25931, 10.5336, 0.299795342749>,
<-2.19314, -3.36231, 10.2358, 0.289950323491>,
<-2.23197, -3.40002, 10, 0.282284373755>,
<-868.239, -844.603, -5250, 0.282284373755>,
<-2472.91, -2403.32, -14996.6, 0.282284373755>,
}
.... etc
}
I did a little bit of finagling to drop any points that are +/- some
user-defined maximum (thus getting rid of the wild "spokes".
Then I looped through the 400 sub-arrays and generated a cubic spline for each
of them. I just duplicate the first and last data points, but offset them from
the ends of the spline to give me the control points. All the rest of the data
points are just shifted up on increment so I can wedge the [formally
nonexistent] y=0 points into the spline.
Using that spline, I do just what you do - make spheres, but I step through the
spline in 0.005 increments - so it's like a sphere sweep.
I fade the pigment using
#local C = pow(Array [ctr*N].filter,2)*4*<1, 1, 0> + (0.5-Array
[ctr*N].filter)*2*<1, 0, 0>;
and then use pigment { color C }.
I'm kind of interested in what the OP's finished product will look like.
Hopefully it's not just a grab-and-run. ;)
I can post the code in the scene file section if you'd like, and I guess I'd
have to email you the spreadsheet. That was really the hardest hair-pulling
part, since I was out of practice. ;)
Post a reply to this message
|
|