# Circle looks like ellipse

7 messages
Open this post in threaded view
|

## Circle looks like ellipse

 Hi  I want to plot a simple tear drop-like a function.  I have a problem while plot screen. Circle looks like ellipse so that  X and Y axis scale not equal. Full code is below. Please can you help me ?  *********************************************** %circle center: (center_x,center_y) %circle radius:radius % y axis component of any top point % (x1,y1)->(x2,y2)<-(x3,y3) % function tear_drop(center_x,center_y,radius,top_y_point) th = linspace( pi, (2*pi), 100); R = radius/2;  %or whatever radius you want x = R*cos(th)+center_x; y = R*sin(th)+center_y; x1=center_x-(R); x2=center_x; x3=center_x+(R); y1=y3=0; y2=top_y_point; plot([x1 x2], [y1 y2],'r') hold on plot([x2 x3], [y2 y3],'r') hold on plot(x,y,'k'); hold on endfunction *******************************************
Open this post in threaded view
|

## Re: Circle looks like ellipse

 Am 25.07.19 um 14:19 schrieb Aziz YÜCELEN: > I want to plot a simple tear drop-like a function.  I have a problem > while plot screen. Circle looks like ellipse so that  X and Y axis scale > not equal. Full code is below. Please can you help me ?  axis equal
Open this post in threaded view
|

## Re: Circle looks like ellipse

 In reply to this post by Aziz YÜCELEN Am 25.07.19 um 14:19 schrieb Aziz YÜCELEN: Hi  I want to plot a simple tear drop-like a function.  I have a problem while plot screen. Circle looks like ellipse so that  X and Y axis scale not equal. Full code is below. Please can you help me ?  *********************************************** %circle center: (center_x,center_y) %circle radius:radius % y axis component of any top point % (x1,y1)->(x2,y2)<-(x3,y3) % function tear_drop(center_x,center_y,radius,top_y_point) th = linspace( pi, (2*pi), 100); R = radius/2;  %or whatever radius you want x = R*cos(th)+center_x; y = R*sin(th)+center_y; x1=center_x-(R); x2=center_x; x3=center_x+(R); y1=y3=0; y2=top_y_point; plot([x1 x2], [y1 y2],'r') hold on plot([x2 x3], [y2 y3],'r') hold on plot(x,y,'k'); hold on endfunction ******************************************* Hi, there is a manual online and it is always helpful to have a look there. Maybe this helps you: <https://octave.org/doc/v4.2.1/Axis-Configuration.html#Axis-Configuration| and another hint: look at example 1. Ciao Karl
Open this post in threaded view
|

## Ynt: Circle looks like ellipse

 In reply to this post by Andreas Weber-6 Thank you. It solved my problem. Gönderen: Andreas Weber <[hidden email]> Gönderildi: 25 Temmuz 2019 Perşembe 15:20 Kime: Aziz YÜCELEN <[hidden email]>; [hidden email] <[hidden email]> Konu: Re: Circle looks like ellipse   Am 25.07.19 um 14:19 schrieb Aziz YÜCELEN: > I want to plot a simple tear drop-like a function.  I have a problem > while plot screen. Circle looks like ellipse so that  X and Y axis scale > not equal. Full code is below. Please can you help me ?  axis equal
Open this post in threaded view
|

## Re: Circle looks like ellipse

 In reply to this post by Andreas Weber-6 Am 25.07.19 um 14:20 schrieb Andreas Weber: > Am 25.07.19 um 14:19 schrieb Aziz YÜCELEN: >> I want to plot a simple tear drop-like a function.  I have a problem >> while plot screen. Circle looks like ellipse so that  X and Y axis scale >> not equal. Full code is below. Please can you help me ? > axis equal > > Maybe you don't know this: