Le 02/04/2019 Ã 08:51, Wallace a Ã©critÂ :
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> "Wallace" <819### [at] qqcom> wrote:
>>> Hi folks, I am new to the software and this community. I am a year 4 civil
>>> engineering student. To finish my final year project, I am required to learn
>>> this software. I use Pack3D in matlab to generate some particles with a lot of
>>> xyz coordiantes as well as radius from central point. I wonder how could I use
>>> Povray visualize a single particle with lots of x-y-z coordinate. I cant find
>>> the correct coding for my visualization. Hope can find some help here. Thank
>> Write the <x,y,z> vector and radius to a file.
>> Read in the values, generate a sphere of that radius at that point.
>> Could you explain more in details?
> Since I have no coding background before, I have to start from zero. The data I go
> t from matlab is a particle with 162 points, a list of xyz coordinates and the
distance between every point and the cen
> tral point of the particle. I wonder any coding example that i could refer to?
Sound like you want to see the hull of the points around the central
point... connecting the cloud of points back to make a surface...
Something I would rather try in meshlab, because the involved
algorithm(s) to select the "right" neighbours of a point to make a
triangle is a vast field (something specialized software for 3D scanners
have to do, as part of reconstruction of the mesh from the scanned points).
Are the 162 points ordered in any way ? or do you have to assume they
are random ?
One thing you can start with povray is reading the data in an array
(povray supports up to 5D vector, so xyz + distance fits easily in 4D array)
// and here come the hope the points are in a file as
// "X, Y, Z, Distance" one point per line
#fopen MyDataFile "filename.ext" read
#local Entry = 0;
#local XValue = 0;
#local YValue = 0;
#local ZValue = 0;
#local DistanceValue = 0;
#read (MyDataFile, XValue, YValue, ZValue, DistanceValue)
#declare MyPoint[Entry] = < XValue, YValue, ZValue, DistanceValue >;
#declare Entry = Entry + 1;
This would not show any shape so far, but you could then use the SDL to
manipulate your data for further operations.
>> Points for style would be to figure out where the camera should be located to
>> make sure all the spheres are in the raytraced image.
>> This has been covered before, and I replied rather frequently to Ari -
>> Thank you so much for your help.
Post a reply to this message