(g)nu box testing
Moderator: Mike Everman
-
- 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
Turtle graphics ...
-
- 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
Code: Select all
(define (Fahrenheit->Celsius tempF)
(/ (* 5 (- tempF 32)) 9) )
Code: Select all
> (Fahrenheit->Celsius 212)
100
-
- 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
Code: Select all
1 ]=> (define pi (* 4 (atan 1.0)))
;Value: pi
1 ]=> pi
;Value: 3.141592653589793
1 ]=>
-
- 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
Drawing a smooth egg-shape, e.g. a cam lobe.
-
- 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
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.
-
- 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
... the previous is a colorized construction of an egg.
-
- 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
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)
-
- 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
I now realize I never explained what this was.
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.
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.