On 12/11/2014 07:08 AM, Sasha Pachev wrote: > Then once you've done the ugly algebra resulting from the > substitutions you set z to 0 and obtain the equation of the x-y > cross-section of the cone which will be the hyperbola that you wanted > provided you rotated by the correct angle. You can also get an ellipse > depending on the angle of rotation. Either way - the resulting > equation allows you to plot it.
Okay I've had some success. Turns out I need to rotate the cone in all three dimensions, not just one or two. The algebra is pretty hairy as you say, but thanks to the wonders of modern maths packages[1], solving for y only takes a minute instead of a long time by hand to manipulate the variables and solve the quadratic equation. Plus if I keep everything symbolic I can plug in variables in the code later. I also don't think I need to translate the cone, as I can just set z=1 as the cone vertices are still lying on the origin. Also I found wolframalpha's site can do 3-d plotting to examine the resulting transformation. Then its just a matter of comparing the resulting curves to the trace plotted by the sweeping vector version of my code. I'll have to post the final subroutine when I'm done. It's some hairy algebra for sure. [1] There are lots of options, including Mathematica. There are several symbolic math packages for linux. I found that Mathics (http://mathics.org) works well enough for my purposes. /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
