- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This one has my head spinning.
The challenge is to write a function that returns the point on an ellipse where the tangent direction is equal to the one entered.
The function shall take two (2) arguments:
1. the ename of the ellipse
2. the desired tangent angle in radians
No, you will not make your own ellipse, nor have your function select one, nor add any code to confirm that the entity is in fact an ellipse. If you can't use what I give you below, then tell your boss (if you have one) and tell your family (if you have one) and tell your friend (if you have one) that you are taking a one-way trip to the Ukraine (or Chatsworth, NJ if you prefer).
I am ignorant of any direct way to find the point, so to me it will require iteration to converge on the solution.
You may use a fuzz of 1e-8, nothing larger. @calderg1000 is the only one entitled to use a fuzz of zero.
This exercise is only for determining the point in space where Tommy Lee Jones must exit the space station to land on the moon. It's not for like building a geometrically perfect playground or something.
The ellipse is defined as:
(setq ellipse
(entmakex
'((0 . "ELLIPSE")(100 . "AcDbEntity")(67 . 0)(410 . "Model")
(8 . "0")(100 . "AcDbEllipse")(10 36.0 5.0 0.0)(11 -2.0 1.5 0.0)
(210 0.0 0.0 1.0)(40 . 0.5)(41 . 0.0)(42 . 5.0))
)
)
The angle in radians = 5.8
I have no idea as yet what the solution is, nor may I ever find out except by trial and error, or if @LeeMinardi shows me with his vector voodoo.
John F. Uhden
Solved! Go to Solution.