comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: find a plane in a 3D plot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: find a plane in a 3D plot [message #62488] Fri, 12 September 2008 09:20 Go to previous message
Nicola is currently offline  Nicola
Messages: 21
Registered: November 2005
Junior Member
On Sep 12, 4:47 pm, Wox <nom...@hotmail.com> wrote:
> On Fri, 12 Sep 2008 02:54:09 -0700 (PDT), Nicola
>
> <nicola.viane...@gmail.com> wrote:
>> I have to find a
>> way to identify this plane and the direction perpendicular to this
>> plane in the more accurate way as possible.
>
> The code below is one way of doing things. The resulting plane is
> defined with a normal vector and a point.
>
> pro test
> x=[1.,0,1,2,3,4]
> y=[0.,1,1,2,3,4]
> z=[2.,2,2,2,2,2]
>
> ; Orthogonal distance regression
> ; check e.g.http://mathforum.org/library/drmath/view/63765.html
>
> ; Centroid: orthogonal distance
> ; regression plane goes through it
> n=n_elements(x)
> data=transpose([[x],[y],[z]])
> centroid=total(data,2)/n
>
> data[0,*]-=centroid[0]
> data[1,*]-=centroid[1]
> data[2,*]-=centroid[2]
>
> SVDC, data, W, U, V
>
> smallest_singularvalue=min(W,ind)
> plane_normal=reform(V[ind,*])
>
> print,'Orthogonal distance regression plane'
> print,'1. goes through: ',centroid
> print,'2. has normal: ',plane_normal
> end;pro test

Thank you all. This was something I was thinking about, essentially
similar to what is called Minimum variance Method which is a method
used for Cluster data satellite. Now I have a perhaps smallest
problem, which is the graphics..... How I put the found plane on the
same 3D box? I know perhaps this is a stupid question but my knowledge
of IDL 3D plotting is quite scarce....
regards to all of you for your quick reply
Nicola
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: map_set problem
Next Topic: find a plane in a 3D plot

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:56:01 PDT 2025

Total time taken to generate the page: 0.00485 seconds