LOGO-L> Sphere or bulb 
Author Message
 LOGO-L> Sphere or bulb

Hello Turtles,

I have found an old mail (dated October 23) from Mr. MHELHEFNY, with 4 methods to draw a sphere in MSWLogo 3D. There are Christmas coming, and I found that one more way to produce a sphere (i.e. a bulb for a Christmas Tree) may be useful.
This is a short and simple, I hope, procedure. It use only rudimentary turtle move commands and applies very little trigonometry. (I'm proud of this). The result, with appropriate PENCOLOR and PENSIZE, may be as attached. It should run in PERSPECTIVE mode, of course.

This is a procedure itself:

to sph4 :z :w :dx
 localmake "om (180 / :z / :w)
 localmake "fi arctan (1 / :z / 2 )
 repeat (:z * :w) [up :fi fd :dx*sin (repcount * :om ) down :fi rt (360 / :w) ]
end

You may run it with :z=18 :w=18 :dx=30 for example and any starting turtle position.

There are 3 questions, which a demanding student may ask:
1-      Is it really a sphere ?
2-      Where is a centre?
3-      How to draw only a visible hemisphere?
I have no students, so I don't need to look for the answer.

Regards,
Andrzej B.

  rkula.gif
< 1K Download


Sun, 04 Jun 2000 03:00:00 GMT  
 LOGO-L> Sphere or bulb

I like your spiral sphere, very XMAS looking.

This will draw a sphere as well with no trig. but without a
"grid".

to sphere :rad
repeat 18 [circle :rad rr 20]
end

You can draw the grid without using any trig.
Hint: Let logo do the trig for you.

See the solar.lgo example for how to draw the grid. But
it does use trig to do the horz. circles to form the grid.

Quote:

> Hello Turtles,

> I have found an old mail (dated October 23) from Mr. MHELHEFNY, with 4 methods to draw a sphere in MSWLogo 3D. There are Christmas coming, and I found that one more way to produce a sphere (i.e. a bulb for a Christmas Tree) may be useful.
> This is a short and simple, I hope, procedure. It use only rudimentary turtle move commands and applies very little trigonometry. (I'm proud of this). The result, with appropriate PENCOLOR and PENSIZE, may be as attached. It should run in PERSPECTIVE mode, of course.

> This is a procedure itself:

> to sph4 :z :w :dx
>  localmake "om (180 / :z / :w)
>  localmake "fi arctan (1 / :z / 2 )
>  repeat (:z * :w) [up :fi fd :dx*sin (repcount * :om ) down :fi rt (360 / :w) ]
> end

> You may run it with :z=18 :w=18 :dx=30 for example and any starting turtle position.

> There are 3 questions, which a demanding student may ask:
> 1-      Is it really a sphere ?
> 2-      Where is a centre?
> 3-      How to draw only a visible hemisphere?
> I have no students, so I don't need to look for the answer.

> Regards,
> Andrzej B.

>     ---------------------------------------------------------------

>                                Name: rkula.gif
>               Part 1.2         Type: GIF Image (image/gif)
>                            Encoding: base64
>                         Description: rkula.gif (Obraz GIF)

--
===============================================================

http://www.softronix.com/
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------





Mon, 05 Jun 2000 03:00:00 GMT  
 LOGO-L> Sphere or bulb

Last part of my mail dropped out. It should look like this:

Hello Turtles,

I have found an old mail (dated October 23) from Mr. MHELHEFNY, with 4 methods to draw a sphere in MSWLogo 3D. There are Christmas coming, and I found that one more way to produce a sphere (i.e. a bulb for a Christmas Tree) may be useful.
This is a short and simple, I hope, procedure. It use only rudimentary turtle move commands and applies very little trigonometry. (I'm proud of this). The result, with appropriate PENCOLOR and PENSIZE, may be as attached. It should run in PERSPECTIVE mode, of course.

This is a procedure itself:

Quote:
>to sph4 :z :w :dx
> localmake "om (180 / :z / :w)
> localmake "fi arctan (1 / :z / 2 )
> repeat (:z * :w) [up :fi fd :dx*sin (repcount * :om ) down :fi rt (360 / :w) ]
>end

You may run it with :z=18 :w=18 :dx=30 for example and any starting turtle position.

There are 3 questions, which a demanding student may ask:
1-      Is it really a sphere ?
2-      Where is a centre?
3-      How to draw only a visible hemisphere?
I have no students, so I don't need to look for the answer.

Regards,
Andrzej B.

  rkula.gif
< 1K Download


Mon, 05 Jun 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. LOGO-L> sphere or Christmas bulb

2. LOGO-L> Bulbs

3. LOGO-L> two bulbs

4. LOGO-L> 4methods to draw a Sphere

5. LOGO-L> Apple logo/MSW Logo

6. LOGO-L> Reseach Machines Logo (RM LOGO)

7. WTD: 'ls -lR '->HTML code

8. LOGO-L> Welcome to logo-l

9. LOGO-L> Re: Dynamic scope in Logo

10. LOGO-L> INFO re SIG-LOGO

11. LOGO-L> Logo speed

12. LOGO-L> Logo foundation site

 

 
Powered by phpBB® Forum Software