Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Dynamic Interactivity sorted by activeAvoid problem while using ViewPoint in a Manipulate?
http://community.wolfram.com/groups/-/m/t/1074533
Hi everyone,
I am making an app which shows a shaft and unbalanced masses coming off it with varying radii and locations along the length of the shaft:
![enter image description here][1]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=3063Shaft.png&userId=1074296
I need the user to be able to select between ViewPoint -> Right and ViewPoint -> Front so that they can set it up easily. I have set ViewPoint to a variable (viewPoint) inside Graphics3D and used that variable to populate a SetterBar in the usual way:
Manipulate[
Graphics3D[
Cylinder[{{0, 0, 0}, {0 + shaftLength, 0, 0}}, shaftRadius],
ViewPoint -> viewPoint,
ImageSize -> {500, 500},
PlotRange -> {{0, shaftLength}, {-0.1, 0.1}, {-0.1, 0.1}},
Boxed -> False
],
{viewPoint, {Right, Front}},
{{shaftLength, 1}, 0.1, 1},
{{shaftRadius, 0.01}, 0.001, 0.05}
]
This works perfectly until I manually adjust the viewpoint with the mouse - which I also need the user to be able to do - and then the buttons stop responding.
Is this a bug, or can someone spot a mistake in my approach?
Thanks,
SiSimon Dee2017-04-27T05:38:23ZDetermine Timing of Dynamic Refreshes?
http://community.wolfram.com/groups/-/m/t/1075337
How would one determine the efficiency of a code for which drawing a graphic is the most expensive step?
I am investigating various methods to change a graphics object in a Dynamic[Graphics[...]]
For example,
positions = RandomReal[{-1, 1}, {200, 2}];
colors = RandomColor[Length[positions]];
radii = RandomReal[{0, .1}, Length[positions]];
Dynamic[Graphics[MapThread[{#3,Disk[#1,#2]}&,{positions, radii, colors}]]
I am curious how much time each Dynamic refresh takes.
I tried using EvaluationData, but couldn't make it work. I wonder if there is a way to create a "DynamicEvaluationMonitor"?W. Craig Carter2017-04-27T15:08:50ZAvoid problems with Dynamic Updating?
http://community.wolfram.com/groups/-/m/t/1074905
Hello everyone,
I am learning the Wolfram Mathematica language doing some simple programs but i got stuck.
I was writing code that show a parametric curve and its derivate, with a tangent vector for each one and the module of vector velocity.
The problem is that when i enable dynamic updating the yellow dot on the icon of Wolfram in the application bar starts blinking red and the module of the vector change even if the vector is still.
It's the first time i get this errors, and i don't know why. If someone could help me, i left the code here, i hope it's well written.
Thank you.
Module[
{f, g},
Manipulate[
f[x_] := x Cos[x];
g[x_] := x Sin[x];
plot1 = Graphics[
{
{Blue, Arrow[{{0, 0}, {f[n], g[n]}}]},
{Orange, Arrow[{{0, 0}, {f'[n], g'[n]}}]},
{Red, Arrow[{{f[n], g[n]}, {f'[n] + f[n], g[n] + g'[n]}}]},
{Purple, Arrow[{{f'[n], g'[n]}, {f'[n] + f''[n], g'[n] + g''[n]}}]}
}];
plot2 = ParametricPlot[
{
{f[x], g[x]},
{f'[x], g'[x]}
},
{x, 0, 2 Pi}
];
Show[{
plot1,
plot2
},
Axes -> {True, True}, PlotRange -> {{-5, 9}, {-7, 9}}
],
{n, 0, 2 Pi}, Delimiter,
Dynamic@
Style["T =" <> ToString[NumberForm[N[Sqrt[(f'[x])^2 + (g'[x])^2]], 3]],
FontFamily -> "Arial", FontSize -> Medium, FontColor -> Col]
]
]Riccardo Lombardi2017-04-27T07:55:40Z