You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

last night I googled for an online graphing calculator for polar equations. Quicky found http://gcalc.net/ the calculator's interface is a bit of a nightmare but got the hang of it eventually. Anyways, I was talking to a buddy on AIM and showed him the calculator and how you could draw all kinds of cool shapes with polar equations like flowers, clovers, and cartioids. I told my friend to evaluate r = 1 - sin(t), to get the equation of a cartioid, or heart. "Looks more like a buttocks!" my friend said.

See left pick below. Hmm.. he's right! It destroyed my mental picture for something I used to like, and I vowed to design an equation that would look more like a heart. I was up till 3:00 am working on this and was tossing and turning thinking about it when I finally went to bed. (DANG I'm such a nerd!)

The biggest problem is the point of the heart isn't sharp enough. Anyways, I spent a few more hours on it this morning and I'm delighted to say I formed an equation that looks very much like a heart. See the right hand pic. Much better eh? I call it Mikau's Cartioid! (assuming no one's already claimed it)

The function is r = 3 + sin^2(t - pi/2) - 3 abs(sin(t/2 - 0.75pi) ) factor out the three and you get r = 3 [1 - |sin(t/2 - 0.75pi)| ] + sin^2(t - pi/2), if you replace 3 with a, I've found a will determine how far below zero the point will go. Also adjusting the coefficient of the sin^2(t - pi/2) term effects the shape of the heart though as of yet I've not investigated precisly how.

I'm going to define the general form of this equation as: **r = a[1 - |(sin(t/2 - 0.75pi)| ] + b sin(t - pi/2)^2**

various values for a and b produce nice results.

If anyone wants to hear how I derived this formula just say so, but I won't unless someone is actually willing to read it.

*Last edited by mikau (2006-07-02 11:04:40)*

A logarithm is just a misspelled algorithm.

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

This one here may be my favorite so far. a = 3, b = 1.5

*Last edited by mikau (2006-07-02 11:03:48)*

A logarithm is just a misspelled algorithm.

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

more:

A logarithm is just a misspelled algorithm.

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

So that would be the mathematical equation for love?

"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

great minds think alike. I scrawled the equation down on notepad when I finished it and saved it as "loveequation".

The Equation of Love.... math is fun, but it is also romantic! ;-)

*Last edited by mikau (2006-07-02 12:13:41)*

A logarithm is just a misspelled algorithm.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,582

LOL!

That last cartioid has a nice reflex curve at its base. If you could accentuate that curve just a little, and make the general shape less broad (or possibly taller) it would be nearly perfect.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

picky picky! Well that little reflex curve seems to appear when b is close to (but less then) a. If I make it taller, the reflex curve tends to dissapear. But I need to make a larger to make it taller so I'd have to find a ballance. Gimme a sec...

A logarithm is just a misspelled algorithm.

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

Ok heres one a bit taller, but you can see the reflex curve is more mild.

I might be able to do that though by adding a nother term. If I take a term like sin(t) and raise it to a really really high even power, it wil stay close to zero for most of the time and shoot up really quick when it gets to 1 or -1. If I can make it briefly increase the radius at 270 that might give us a good reflex curve.. this is generally how I went about designing the equation.

I'll work on it..

A logarithm is just a misspelled algorithm.

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

Well I think the best I got was this. I added a term of 0.25sin(t/2 - pi/4)^500 or something like that. I closed the graph already. That doesn't look quite as goo as the other reflex curve. The reason the other looks so nice is because the absolute value term changes direction right there, so thats what produces the sharp point.

A logarithm is just a misspelled algorithm.

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

here's a nice one, a = 3, b = 2, and I added a term of -0.5|cos(t)| this helps to horizontally compress the graph. Doesn't look half bad.

*Last edited by mikau (2006-07-02 14:19:40)*

A logarithm is just a misspelled algorithm.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,582

Ahhh ... both lovely.

I wonder if I should try to extend the Function Grapher and Calculator to do polar and parametric plots? I wonder how hard it would be ... for polar, just run the function for a range of values, converting each to xy as you go ... ?

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

Thanks! You may have noticed I suggested it in the suggestions and comments forum. Yeah I mean thats what I figured, you could just plot is as a series of x,y points where x = r cos(t), y = r sin(t). That should work, right?

And any system anyone creates will be ten times better then the one I'm using for these! That things interface was designed by a blind drunken monkey!

A logarithm is just a misspelled algorithm.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,582

It may be a little "buggy", but this is what I have so far: Plot of 3*(1-abs(sin(t/2-0.75*pi)))+(sin(t-pi/2))^2

(All bug reports gratefully received - we may as well make this a darn good grapher)

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

Wow! You got right on it! That was fast!

Beautiful! Looks even better on that graph!

One thing I think would be good for both polar and rectangular graphs is to set the limits of evaluation. With yours you can set the number of revolutions (which is really cool, couldn't do that with the other one) but if you could begin at 0 or -1 revolution, or 2 revolutions, and set the number of revolutions to begin there, that would be cool.

Also it would probably be good if the "polar" button changed to "rect" when you clicked on it, and the revolutions box dissapeared. Or just have to separate buttons, one polar, one rectangular.

It also seems a little slow at times. Not sure if that can be helped though.

*Last edited by mikau (2006-07-03 05:37:35)*

A logarithm is just a misspelled algorithm.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,582

Thanks, mikau. Slightly updated version: Polar Plot of sqrt(x+5) vs -sqrt(x+5)

Slowness: normally it plots 600 points, as you add revolutions that rises to 3000 (max). The formula is pre-parsed, but has to be calculated that many times, plus time to actually plot the points.

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

My latest creation

Polar Plot of 3*(1-abs(sin(t/2-0.75*pi)))+2*(sin(t-pi/2))^2-0.75*abs(sin((t-pi/2)))

That one almost looks like its built with straight lines and half circles. Creepy!

*Last edited by mikau (2007-01-13 07:31:38)*

A logarithm is just a misspelled algorithm.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,582

It does! And glad to see the program works, too.

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

Yeah thanks again for setting that up!

Either its working or its just making beautifull mistakes! :-)

Btw, was going to ask, how do you create a link like that?

Also, why is the graph suddenly vertically compressed? (or horizontally stretched)

*Last edited by mikau (2006-07-09 15:54:30)*

A logarithm is just a misspelled algorithm.

Offline

**Patrick****Real Member**- Registered: 2006-02-24
- Posts: 1,005

**Love**ly work, both of you! :]

Support MathsIsFun.com by clicking on the banners.

What music do I listen to? Clicky click

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,582

mikau wrote:

Btw, was going to ask, how do you create a link like that?

Got it from the Grapher - click on "forum" button, then copy text (right click, select all, right click, copy)

mikau wrote:

Also, why is the graph suddenly vertically compressed? (or horizontally stretched)

When you select a "zoom" rectangle it zooms exactly the rectangle and goes out of square - I am not sure if I am handling that well.

Offline

**Patrick****Real Member**- Registered: 2006-02-24
- Posts: 1,005

why not just make a fixed ratio of 1:1 - thereby forcing sqaure 'zooms'

Support MathsIsFun.com by clicking on the banners.

What music do I listen to? Clicky click

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,582

Because non-square zooms are also useful, particularly in real-world applications. Population vs time. Temperature versus power. That kind of thing.

I think I just need something to show you it is not square and allow you to re-square, or maintain square or something. But it needs to be simple so the whole thing doesn't become a nightmare to use

Ideas?

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

I think the zooming should be independant of the aspect ratio. Zooming could just increase size and the aspect ratio could be adjusted in a seperate box.

A logarithm is just a misspelled algorithm.

Offline

**Patrick****Real Member**- Registered: 2006-02-24
- Posts: 1,005

That's a very good suggestion mikau! You(mathsisfun) could put an input-box where you could change the ratio if you wanted to.

Support MathsIsFun.com by clicking on the banners.

What music do I listen to? Clicky click

Offline

Pages: **1**