(g)nu box testing

Moderator: Mike Everman

Post Reply
WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Mon May 03, 2010 6:36 pm

 Turtle graphics ...

Image
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Tue May 04, 2010 4:16 pm

Code: Select all

(define (Fahrenheit->Celsius tempF)
  (/ (* 5 (- tempF 32)) 9) )

Code: Select all

> (Fahrenheit->Celsius 212)
100
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Thu May 13, 2010 3:03 am

Code: Select all

1 ]=> (define pi (* 4 (atan 1.0)))

;Value: pi

1 ]=> pi

;Value: 3.141592653589793

1 ]=> 
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Sun May 16, 2010 12:03 am

 Drawing a smooth egg-shape, e.g. a cam lobe.

Image
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Mon May 17, 2010 12:24 am

Image
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Mon May 24, 2010 12:02 am

Image
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Mon May 24, 2010 4:12 pm

 The above is how to construct a tangent to a circle through a point external to the circle. This technique can be performed with a straight edge and compass.
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Tue Jun 01, 2010 12:03 am

Image
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Wed Jun 09, 2010 4:17 pm

... the previous is a colorized construction of an egg.
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Fri Jul 16, 2010 3:57 am

Code: Select all

(define (roulette-wheel)
  (random 37))

(define (roulette-wheel number-to-bet)
  (compare-with-bet (random 37) number-to-bet)))

(define (compare-with-bet wheel-spin bet)
  (if (= wheel-spin bet)
      (display "You won! ")
      (display "You lost! "))
  wheel-spin)
Image

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

Re: (g)nu box testing

Post by WebPilot » Fri Jul 30, 2010 4:01 am

I now realize I never explained what this was.

Image

Given a circle and a point outside of the circle, construct the
tangents to this circle through this point.

A CAD program can easily do this with SNAP-TANGENT, but this
is how it's done if you do not have this feature in your drawing
program.
Image

Post Reply