Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to show (dynamically) the curvature and torsion in a CDF to understand the quantitative measure of any points. Do you know what I have to do to show data in a Animate graph?

I want to view curvature and torsion in different curves to understanding the graphical sense.

Thank you.

I add the code where i want to see dynamically the curvature and torsion

Hello, what i want if to visualize the curvatura and torsion in every point where you can see the Frenet-3 vectors

r[t_] := {Sin[t], Cos[t], a*t}
uT[t_] := Simplify[r'[t]/Norm[r'[t]], t \[Element] Reals]
vN[t_] := Simplify[uT'[t]/Norm[uT'[t]], t \[Element] Reals]
vB[t_] := 
 Simplify[Cross[r'[t], r''[t]]/Norm[Cross[r'[t], r''[t]]], 
  t \[Element] Reals]
{uT[t], vN[t], vB[t]} // Column // TraditionalForm

rp1[t_] = Simplify[D[r[t], t]]
rp2[t_] = Simplify[D[rp1[t], t]]
rp3[t_] = Simplify[D[rp2[t], t]]

{rp1[t], rp2[t], rp3[t]} // Column // TraditionalForm


curvatura[t_] := 
 Sqrt[Cross[rp1[t], rp2[t]].Cross[rp1[t], rp2[t]]]/(Sqrt[
Print["curv ", curvatura[t]]
Print["curv ", N[ curvatura[2]]]
Print["curv ", curvatura[Pi/2]]
Print["curv ", curvatura[Pi]]

torsion[t_] := 
 Det[{rp1[t], rp2[t], rp3[t]}]/
  Sqrt[Cross[rp1[t], rp2[t]].Cross[rp1[t], rp2[t]]]
Print["tors ", torsion[t]]
Print["tors ", N[torsion[2]]]
Print["tors ", torsion[Pi/2]]
Print["tors ", torsion[Pi]]

Simplify[Norm /@ {uT[t], vN[t], vB[t]}, t \[Element] Reals]
 Show[ParametricPlot3D[{r[t]}, {t, -Pi/a, Pi/a}, 
   PlotStyle -> {Blue, Thick}], 
  Graphics3D[{{Thick, Darker@Red, 
     Arrow[{r[s], r[s] + uT[s]}]}, {Thick, Darker@Green, 
     Arrow[{r[s], r[s] + vB[s]}]}, {Thick, Darker@Cyan, 
     Arrow[{r[s], r[s] + vN[s]}]}}],(*Print[curvatura[r,s]],Print[
  torsion[r,s]],*)PlotRange -> {{-2, 2}, {-2, 2}, {-Pi, Pi}}, 
  ViewPoint -> {3, -2, 2}], 
 Style["Representación espacial de la noria del hamster", 12, 
  Bold], Delimiter, {{a, 0.5, "a (elegir valor entre -1 y 1)"}, -1, 1,
   Appearance -> "Open"}, Delimiter, {{s, -Pi, 
   "Valor del parametro en el que se visualizar el Triedro de \
Frenet"}, -Pi/a, Pi/a, 
  Appearance -> 
   "Open"},(*Delimiter,Style["Curva Azul.- Representación de la \
curva" r[u],Darker@Blue],*)Style["Curvatura ", curvatura[s]], 
 Style["Torsión ", torsion[s]],
 Style["Vertor Rojo.- Representa el vector Tangente", Darker@Red], 
 Style["Vector Cyan.- Representa el vector Normal", Darker@Cyan], 
 Style["Vector Verde.- Representa el vector Binormal", Darker@Green], 
 ControlPlacement -> Left, SaveDefinitions -> True]

share|improve this question
Hello and welcome to the Mathematica StackExchange. It is helpful to include a minimal, working example that illustrates the important part of the problem. Users can then copy/paste/try your code and reproduce your problem. (There seems to be no code in your CDF.) – Michael E2 Mar 31 '13 at 15:51
Related demonstration: – Michael E2 Mar 31 '13 at 15:51
up vote 3 down vote accepted

Here's a dynamic graph, some data about it. There are many ways to organize and display information, so if this is not helpful, perhaps the question could be edited to be more specific about what output is desired.

a = 3.;
Row[{Slider[Dynamic@a, {1, 5}], Dynamic@Plot[Sin[a t], {t, 0 , 6}], 
  " Period ", Dynamic[ 2 \[Pi]/a], " "}]

Slider, plot, period


For the curvature and torsion lines, you need something like

Row[{Style["Curvatura "], Dynamic@curvatura[s]}],
Row[{Style["Torsión "], Dynamic@torsion[s]}],

The Style wrapped around each string is unnecessary, unless you wish to change the style. The default looks like this:

OP's Manipulate with my mods

share|improve this answer
Hello, what i want if to visualize the curvatura and torsion in every point where you can see the Frenet-3 vectors...... i tried with Row.... as you suggested me, but i can´t reach solution. Here is the code. What and where i have to put the extra code to reach the solution. THANK YOU very much. – Mika Ike Mar 31 '13 at 19:05
Perfect Michael E2. You have solve my question 100% – Mika Ike Mar 31 '13 at 19:15
@MikaIke OK, you're welcome. – Michael E2 Mar 31 '13 at 19:16
as extras.... ¿How can i put curvatura and torsion in bigger TrueType to see easy? as a extra ;-) because you has solve plenty my question – Mika Ike Mar 31 '13 at 19:21
@MikaIke Use Style. Style[expr, Larger] or Style[expr, 16], where expr is what you want bigger. It can be the whole Row. – Michael E2 Mar 31 '13 at 19:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.