cycloids and wrapping towards 
Author Message
 cycloids and wrapping towards

hello,
i need help

i am drawing a cycloid

to cycloid
setheading 90
pendown
repeat 3600 [ ~
        localmake "currhead heading ~
        setheading 90 ~
        fd 1 ~
        setheading :currhead ~
        rt 1 ~
        fd 1 ~
        ]
end

this works, but the line is to jaggy.
so, here is an improved version

to cycloid.fine
setheading 90
repeat 3600 [ ~
        penup ~
        localmake "currhead heading ~
        localmake "oldpos pos
        setheading 90 ~
        fd 1 ~
        setheading :currhead ~
        rt 1 ~
        fd 1 ~
        localmake "currhead heading ~
        localmake "newpos pos ~
        setpos :oldpos ~
        setheading towards :newpos ~
        pendown ~
        fd distance :newpos ~
        penup ~
        setheading :currhead ~
        ]
end

this version does strange things when it wraps.
the reason is that towords does not give the direction for wrapping.
so we would need a wrapping version of towards.

has anybody coped with this problem already?

erich



Fri, 27 Sep 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Baby steps towards Common APL?

2. Towards a proper benchmark suite for Eiffel

3. Towards a Universal Container Cluster (LONG)

4. SELF-DISCIPLINE: Towards better News

5. Towards better Eiffel GUI builders

6. AU.FS: towards a binary portability wordset?

7. Towards unassisted learning

8. Towards a Logo FAQ (1 of 2)

9. Towards a Logo FAQ (2 of 2)

10. research towards Ph.D. position available

 

 
Powered by phpBB® Forum Software