Message Boards Message Boards

0
|
30823 Views
|
6 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Plotting circle equation in Wolfram|Alpha?

Posted 8 years ago

Hi,

I was trying to plot circle equations and found a strange bug:

When plotting following equation:

0.66^2 = (x-1)^2 + (y-1)^2

the circle is plotted correctly as expected.

But when taking the square root first on both sides:

0.66 = sqrt((x-1)^2 + (y-1)^2)

the circle printed has nearly double the radius as expected. Also I tried to verify if the radius is really "double" the expected one by plotting a vertical line in the same plot:

0.66 = sqrt((x-1)^2 + (y-1)^2), x = -1.32

This however plots the correct circle.

When I'm missing something here, I apologize.

Best regards!

POSTED BY: Mawe Sprenger
6 Replies

@Mawe Sprenger please do NOT put word "BUG" in titles unless it was confirmed to you.

POSTED BY: Moderation Team
Posted 8 years ago

Hi Mawe,

Can you share the code as to how you are plotting these?

I tried the following:

ContourPlot[0.66^2 == (x - 1)^2 + (y - 1)^2, {x, 0, 2}, {y, 0, 2}]
ContourPlot[0.66 == Sqrt[(x - 1)^2 + (y - 1)^2], {x, 0, 2}, {y, 0, 2}]

And they came out the same circle.

Cheers,

Wilson

POSTED BY: Wilson Kan
Posted 8 years ago

Hi Wilson,

I just went to https://www.wolframalpha.com/ and typed in exactly what I wrote in my first post.

Best regards, Mawe

POSTED BY: Mawe Sprenger
Posted 8 years ago

Hi Mawe,

Not sure why your replay isn't showing up.

And my apology for not reading the tag of the post to know it's for W|A.

If you look at the "bugged" plot carefully, the intersection of the x and y axis is actually not (0,0)... it intersects at (0.5, 0.5) [Why it defaults to that, I don't know]. But if you adjust the plot domain

0.66 = sqrt((x-1)^2 + (y-1)^2), x in (0, 2)

You will get what you are looking for again.

Cheers,

Wilson

POSTED BY: Wilson Kan
Posted 8 years ago

Hi Wilson,

and I really thought checking the axis 100 times is enough before writing this post.

Next time I'll check 101 times.

Thanks and best regards, Mawe

POSTED BY: Mawe Sprenger

Hi. How to export both x and y data of this contourplot in a .dat file ?? best regards

POSTED BY: Mahsa Mehrangiz
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract