How do define points as spheres in MATLAB
October 30, 2007 2:00 PM
Subscribe
In MATLAB, how do you represent moving objects not as points in 3d space but as spheres with a certain radius?
I am working in MATLAB to model spheres that need to touch each other in a continuous space. At the moment they are defined by x, y, and z coordinates and a certain vector velocity and are represented by points. I want them to be a 3d shape so that their surfaces can meet. I have been attempting to do this by setting the "markersize," however I cannot seem to figure out the algorithm that MATLAB uses to relate the arbitrary number for markersize and it's actual radius as compared to it's axes. Does anyone have suggestions for how to use Markersize and know it's actual radius or another method of representing a point as a sphere? Is my only option to define my own sphere at that point?
posted by kaozity to computers & internet (6 comments total)
If you just want a computational model, why not just give each object a radius r and if r1+r2 = sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2), objects 1 and 2 are touching?
posted by mr_roboto at 2:15 PM on October 30, 2007