Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

Subject: RE:MIA, Ask an Expert: octagon diagonals
From: mwforum@xxxxxxxxxxxxxxxxxx (Daniel Ajoy)
Date: Mon, 31 May 2004 23:14:55 -0500

> > from: orangetow@xxxxxxxxx
> > date: Sun, 30 May 2004 7:54:02 -0600
> >
> > if an octagon's diagnals are 139.25 inches,
> > how long is each of its 8 sides


On 30 May 2004 at 17:52, Dan Stone wrote:

> My quick and dirty procedure - I just changed the side length until the
> shape could 'hold' the diagonals
> that were drawn as 2 rectangles.

But there are other diagonals (image attached)

graphic

I found that out, here:
http://mathworld.wolfram.com/PolygonDiagonal.html

> Okay, have I made a mountain out of a molehill? <grin>
> What would be a better way to have done this?

I used these procedures to find each possible length:

to octagon :x
cg
t1,
pu home pd repeat 8 [fd :x rt 45]
t2,
pu home pd repeat 2 [fd :x rt 45]
op distance "t1
end


------------------

to octagon :x
cg
t1,
pu home pd repeat 8 [fd :x rt 45]
t2,
pu home pd repeat 3 [fd :x rt 45]
op distance "t1
end

------------------


to octagon :x
cg
t1,
pu home pd repeat 8 [fd :x rt 45]
t2,
pu home pd repeat 4 [fd :x rt 45]
op distance "t1
end

------------------

Since we want the distance that is the output of octagon
to be 139.25 in each case we could use trial and error
for each of the three possible lengths. But we can also use
this "find" procedure. It is fun to see it working.

to find :func :ini :fin
if 0.001 > abs :ini - :fin [op :ini]
let [mid (:ini + :fin) / 2]
let [fini run se :func :ini]
let [ffin run se :func :fin]
let [fmid run se :func :mid]
if :fini * :fmid < 0 [op find :func :ini :mid]
if :fmid * :ffin < 0 [op find :func :mid :fin]
end


; with repeat 2
show find [139.25 - octagon] 50 100
75.3608703613

; with repeat 3
show find [139.25 - octagon] 50 100
57.6789855957

; with repeat 4
show find [139.25 - octagon] 50 100
53.288269043


Project attached.

Daniel
OpenWorld Learning

Attachment: octagon.mw2
Description: Binary data


  • Previous by thread: MIA, Ask an Expert Question
  • Next by thread: RE:MIA, Ask an Expert: octagon diagonals

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008