Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Plane equation with a radius and a center point

Subject: Plane equation with a radius and a center point

From: Junghyun

Date: 11 Jul, 2010 02:48:04

Message: 1 of 3

Hi, guys

I need to define a circle which lies in a plane perpendicular to a given vector with a circle's center point c and the radius r.
How can I formulate it?

Thank you.
Junghyun

Subject: Plane equation with a radius and a center point

From: vedenev

Date: 11 Jul, 2010 05:44:05

Message: 2 of 3

Here is the code example

v=[1 2 3]'; % directional vector
vl=sqrt(v'*v);
w=v/vl;

w12=w(1)^2;
w22=w(2)^2;
iw=(w12+w22);
w12m=w12/iw;
w22m=w22/iw;
R12=-w(1)*w(2)*(1-w(3))/iw;
R0=[w22m+(1-w22m)*w(3) R12 ;
     R12 w12m+(1-w12m)*w(3) ;
      -w(1) -w(2) ]; % rotation matrix

  % circle in 2d:
  R=10;
  al=0:pi/12:2*pi;
  r2d=[R*cos(al)
      R*sin(al)];

  r=R0*r2d; % rotate to 3d
  r(1,:)=r(1,:)+3*w(1);
  r(2,:)=r(2,:)+3*w(2);
  r(3,:)=r(3,:)+3*w(3); % shift alog w at 3

  % display:
  plot3(r(1,:),r(2,:),r(3,:),'b-');


------------------------------------
Maxim Vedenev, Matlab freelancer
vedenev@ngs.ru
http://simulations.narod.ru/

Subject: Plane equation with a radius and a center point

From: us

Date: 11 Jul, 2010 10:15:08

Message: 3 of 3

"Junghyun " <wkhdntnkpst@yahoo.com> wrote in message <i1bbd4$p20$1@fred.mathworks.com>...
> Hi, guys
>
> I need to define a circle which lies in a plane perpendicular to a given vector with a circle's center point c and the radius r.
> How can I formulate it?
>
> Thank you.
> Junghyun

what have YOU done so far to solve YOUR particular problem...

us

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us