Hi everybody!
I'm trying to paint a part of a circle with a dashed line, but it won't come up to me in an easy way. Mayby somebody can help.
The following things work fine so far:
1. I'm able to paint a circle automatically arround the point of origin with a radius of 139. The program starts drawing the circle at x=139; y=0. That's the code:
<set{ angle }to( 0
<set{ radius }to( 139
<set{ r }to( radius
<go to x r )y 0
<repeat until> <( angle <=> 365 )>
<go to x (( <cos( angle <*> r )) )y (( <sin( angle <*> r ))
<change{ angle }by( 5
2. I'm able to start drawing a line at the position x=0; y=139 (angle = 90 degree) using <pen down> and stop drawing the line of the circle at an angle of 130 degree using <pen up>.
That's what's work. What I wanna do now is:
The part of the circle between 90 degree and 130 degree should be dashed!! It works with the following solution, which is very poor, I think (in the <repeat until> loop and under <change{ angle }by( 5 of the code above)
<if> <( angle <=> 95 )>
<pen down>
<if> <( angle <=> 100 )>
<pen up>
.
.
.
<if> <( angle <=> 130 )>
<pen up>
That's a lot of code and I'm sure there's a more efficient way, because drawing a dasched line between 90 degree and 180 degree would be the next step.
Can anybody help?
Offline
I made this:
http://scratch.mit.edu/projects/justtestingstickman/672874
Not sure if it's EXACTLY what you want though.
Offline