Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
plotting equations
#1
I have this program that draws a parametric equation

import turtle
from math import cos,sin,tan,pi

window = turtle.Screen()

pen = turtle.Turtle()
pen.hideturtle()
pen.pensize(3)
pen.penup()

angle = 0
theta = 0.01 
a=9
b=5
c=4
steps = int (250*pi/theta)

for t in range(0,steps):

        angle+=theta
        x=(cos(a*angle)+cos(b*angle)+cos(c*angle))*80
        y=(sin(a*angle)+sin(b*angle)+sin(c*angle))*80

        pen.goto(x,y)
        pen.pendown()
       
print ("it is done")

turtle.done()
Is there a way in which i can plot a parametric equation without the animation?
Reply


Messages In This Thread
plotting equations - by Agusben - Apr-06-2020, 12:29 AM
RE: plotting equations - by ndc85430 - Apr-06-2020, 04:06 AM
RE: plotting equations - by deanhystad - Apr-06-2020, 04:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  plotting from 3 differential equations grknkilicaslan 1 2,254 Jul-08-2020, 03:38 PM
Last Post: Gribouillis
  Plotting of equations mudezda1 1 3,146 Feb-13-2019, 07:26 AM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020