Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: tubes program not working in version 9
Replies: 3   Last Post: Dec 9, 2012 11:32 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Roger Bagula

Posts: 101
Registered: 7/12/09
Re: tubes program not working in version 9
Posted: Dec 9, 2012 11:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I'm also having trouble with merge cells which erased the {p0,q0} on pasting:
This solution is due to an email from an old friend who is very modest:
TubePlotFrenet2[curve_List, {var_, min_, max_}, radius_, opts___] :=
Module[{tangent, unitTangent, normal, unitNormal, biNormal},
tangent = D[curve, t] // Simplify;
unitTangent = tangent/Sqrt[tangent.tangent] // Simplify;
normal = D[unitTangent, t] // Simplify;
unitNormal = normal/Sqrt[normal.normal] // Simplify;
biNormal = Cross[unitTangent, unitNormal] // Simplify;
ParametricPlot3D[
curve + radius Cos[s] unitNormal + radius Sin[s] biNormal //
Evaluate, {var, min, max}, {s, 0, 2 \[Pi]}, opts]]

h = TubePlotFrenet2[{Cos[2 t] (2 + Cos[5 t] Sin[5 t]),
Sin[2 t] (2 + Cos[5 t] Sin[5 t]), -Sin[5 t]}, {t, 0, 2 \[Pi]}, 1/5,
Axes -> None, Boxed -> False, PlotPoints -> {64, 16},
ColorFunction -> "CandyColors", MeshFunctions -> {#3 &}]

I haven't tried the ver for t solution yet:
this one is much slower.
On Friday, December 7, 2012 10:28:54 PM UTC-8, Nasser M. Abbasi wrote:

> p0=1; q0=1; and fixed the above issue with var vs. t,
>
> then it worked.
>
>
>
>
>
> --Nasser






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.