TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Kerry on December 23, 2009, 09:32:10 PM

Title: [CHALLENGE] Fitted Diagonal Length
Post by: Kerry on December 23, 2009, 09:32:10 PM
Given :
Container Width
Container Height
Object Thickness

Calculate Object Length which fits into container with corners touching container sides.

enjoy !
source code solution accepted in any language ( even english)  

Refer attachment:

Title: Re: [CHALLENGE] Fitted Diagonal Length
Post by: It's Alive! on December 24, 2009, 08:18:55 AM
First I would search and copy someone's code :evil:
http://www.theswamp.org/index.php?topic=12578.msg154713#msg154713
Title: Re: [CHALLENGE] Fitted Diagonal Length
Post by: Kerry on December 24, 2009, 08:22:53 AM

bugger !!

Title: Re: [CHALLENGE] Fitted Diagonal Length
Post by: Kerry on December 24, 2009, 08:30:31 AM

My only excuse is :
that was posted before I turned 60, so I can be excused for forgetting about it.
Title: Re: [CHALLENGE] Fitted Diagonal Length
Post by: It's Alive! on December 24, 2009, 08:42:12 AM
I found it while searching for an asin function, it's a good thing too my brain was overloading  :laugh:
Title: Re: [CHALLENGE] Fitted Diagonal Length
Post by: Kerry on December 24, 2009, 08:48:48 AM

Well, I'm off to bed ... Santa will be here soon :)
Title: Re: [CHALLENGE] Fitted Diagonal Length
Post by: CAB on December 24, 2009, 09:15:52 AM
I knew I had seen that before. Just could not find it! :?

My attempt follow my past attempts.
Could not get the triangle relations to work so I fell back on the circle method.