Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Re: Plotting circle

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-21-2019
03:56 AM

02-21-2019
03:56 AM

Plotting circle

Hi everyone.

I'm trying to plot 2 lines and a circle in mathcad prime 4, in the form (x-x0)^2+(y-y0)^2=R^2.

I have values for x0 and y0 and R, but I can't figure out how to plot it. Solving for y gives me complex numbers.

x0 and y0 are defined values of some earlier calculations, so their value can change, so they are not "fixed" numbers.

Any simple way to do this? (Seems all the info on this I can find is pretty old, and I can't open example files and such...)

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-21-2019
04:23 AM

02-21-2019
04:23 AM

Re: Plotting circle

One way is as follows:

i:=0..360

thetai = i*deg (i as a subscript on theta)

x:=x0+R*cos(theta)

y:=y0+R*sin(theta)

Then simply plot y vs x.

Alan

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-21-2019
06:02 AM

02-21-2019
06:02 AM

Re: Plotting circle

Ok, that works. Thanks.

- Any way to make it a function of x? That would be great, that way I could check intersection points with the lines..

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-21-2019
09:03 AM

02-21-2019
09:03 AM

Re: Plotting circle

You can plot versus x, but it's a double-valued function:

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-21-2019
10:35 AM

02-21-2019
10:35 AM

Re: Plotting circle

You may use your appraoch even though the symbolic result uses the imaginary unit (the values derived are real anyway):

To get a closed curve you may define a range variable for plotting as Fred had shown.

But a better approach IMHO is to use different representations for calculations and for plotting. The parameter representation Alan suggested is best suited for plotting. I prefer a small program which returns a matrix of x and y-values of the points of any circle which can be used easily to plot different circles:

You may use this in the following way. I also plotted the two lines which as it looks are nearly tangents of the circle:

Worksheet in format P5 attached

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-23-2019
03:17 AM

02-23-2019
03:17 AM

Re: Plotting circle

n=100

Using posted techniques.

Top Tags