Polar plot function


Táto interaktívna stránka slúži na zobrazenie grafu polárnej funkcie a zmenu niektorých parametrov tejto funkcie. Taktiež si môžme zobraziť aký vplyv má na vykreslenie grafu funkcie dostatočný počet bodov (plotpoints).

Something about polar graphs

Polárne grafy sa používaju hlavne pri zaznamenávaní dát,

ktoré vykazujú určitú cyklickosť alebo sa pri nich zisťuje smer.

Na rozdiel od karteziánskych grafov (x,y), sa polárne grafy orientujú

podľa polárnych súradníc - polomeru r, a uhlu .

príklad polárneho grafu
Všeobecný polárny graf


Inputs:
n1 represents first squaring number at first parenthesis
n2 represents second squaring number at second parenthesis
a1 represents number in first parenthesis sin(A1t)
a2 represents number in second parenthesis cos(A2t)
b represents number in last place behind second parenthesis
p represents number of plotpoints. (not totally accurate,but approx. lower number =less plot points, more plot points= more accurate)

The program can also be run at: https://sagecell.sagemath.org/
To run - press activate or paste the source code into the Sagecell web, link above


source code for copy paste starts under this line :


@interact
def para(n1 = slider(1,5,1,default = 2), n2 = slider(1,5,1,default = 3), a1 = slider(1,10,1/10,6/5), a2 = slider(1,10,1/10,6), b = slider(0,2,1/50,0)):
var('t')
pretty_print(html('$r=' + latex(b+sin(a1*t)^n1 + cos(a2*t)^n2)+'$'))
p = parametric_plot((cos(t)*(b+sin(a1*t)^n1 + cos(a2*t)^n2), sin(t)*(b+sin(a1*t)^n1 + cos(a2*t)^n2)), (t,0, 20*pi), plot_points = 1024, rgbcolor = (0,0,0))
show(p, figsize = [5,5], xmin = -2-b, xmax = 2+b, ymin = -2-b, ymax = 2+b, axes = True)

Click the “Activate button below to apply program.
You need to enable Javascripts in your browser for interactive pages
HELP
>

This page is still work in progress. Becouse of that,

I had encountered problem of copy pasting source code

into sagecel.com and not working. Solution is to add

Tab at start of every line , starting with line number 3 - var ("theta")


#
January 2021

Pavol Durec