[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> What is the wrong with trigonometry



Regarding the subject line:

There is nothing wrong with trig.

But if you have students that are not ready for trig
it's nice if you can leverage Logo's built functions
like FORWARD and TOWARDS to do the trig for you (them).

You can do a "Grided" 3D sphere with no trig (functions).

Folks using Logo are doing trig without trig functions
ALL the time !!!

This is not what I'm looking for but just an example
of a different approach. I generally don't like using
"Random" for a "solution".

This code basically says if you remain at one spot in
space and draw a "dot" equidistant from that spot in
every direction you'll form a sphere.

to sphere :rad
pu
repeat 10000 ~
  [
  setorientation (list random 360 random 360 random 360)
  fd :rad
  setpixel [0 0 0]
  bk :rad
  ]
end

perspective
sphere 100

If you draw lines from the center you'll make a "Goosh Ball".

Actually if you drew a small circle instead of "dot" tangent to
the surface of the imaginary sphere you could get a pretty cool
looking sphere.

Oh what the heck. I don't want to give away all the answers
though (ala Brian's article, maybe more like solutions to the
odd problems like in the back of math book :-)).

to sphere :rad
pu
repeat 100 ~
  [
  setorientation (list 10*random 36 10*random 36 10*random 36)
  fd :rad
  pd down 90 circle 5 up 90 pu
  bk :rad
  ]
end

to xxx
cs
perspective
sphere 100
end

Notice the 5 unit circle could be huge, like 200 will also
produce a sphere (looks like the core of baseball).

Now can you do the common grided sphere with no trig :-)

> 
> ;For the second time hi Andrzej !
> ;George Mills told you to look for the code of the sphere in the solar
> ;example of MSWLogo.
> ;Here is the code reworked from that example to draw a real sphere of
> ;radius :r with even less use of trigonometry since a sine was used
> ;once only;besides we know where its centre is :-
> 
> to sph1 :r :step
>  make "n 180/ :step
>  repeat :turns[make "g repcount* :step-90 make "k :r* sin :g
>  make "rad sqrt(:r* :r- :k* :k) fd :k down 90 circle :rad up 90 bk :k]
> end
> 
> This is not an attempt to reduce the value of your clever code; but
> we should try to make the code clear for our students.
> 
> Now Yehuda will critisize my code for these 3 makes let me in advance
> say what is the wrong with make ? what is the wrong with trigonometry ?
> Merry Christmas !
> Best Regards !
> Mhelhefny
> ;----------------
> ---------------------------------------------------------------
> Please post messages to the Logo forum to logo-l@gsn.org.  Mail
> questions about the list administration to logofdn@gsn.org.  To
> unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.

-- 
===============================================================
George Mills (mills@softronix.com)
http://www.softronix.com/
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home