Where :a is what you multiply by X, :b is what you add to that, and :x is where the turtle is on the x-axis:
to graph :a :b
make "x -450
while [:a*:x+:b>450] [make "x :x+.01] penup make "x :x+01 setx :x sety :a*xcor+:b pendown
while [xcor<450]>450] [stop] make "x :x+01 setxy :x :a*:x+:b]
end
No comments:
Post a Comment