Choppy graphs in mathematica

In summary, Bob is working in Mathematica 6.0 and trying to graph a Fernet type curve using the standard INT normalized basis vectors. He is having trouble with the appearance and calculation speed, even after adjusting parameters and increasing precision. He is looking for any thoughts on how to improve the graph.
  • #1
robert spicuzza
9
0
I have recently been working in Mathematica 6.0 trying to graph various curves using ParametricPlot3D. I have specifically defined:
a1[p_]={(sqrt(25-p^2))*Sin[10*p],(Sqrt(25-p^2))*Cos[10*p],(p)^2};

Graphing this is no problem.

The problem is I am trying to turn this into a Fernet type curve using the standard INT normalized basis vectors one studies in Cal3. ( take the tangent vector, then the normal vector, then the cross product). When I finally end up using the PramametricPlot3D the result although looking correct is pretty rough (very choppy, not clean at all) .

Any thoughts on how to improving the appearance and hopefully calculation speed as I want to ultimately use this in a much larger Mathematica programming context.

I have tried other simplifier Fernet curves and they look ok, examples like a standard doughnut or corkscrew, {Sin, Cos, u }

I assume I probably need to carry greater immediate precision in the various calculations and also need to somehow speed up the calculations. I’ve tried some increased precision commands, but they did not help the graph.

Any thought would be helpful.
Thanks
 
Physics news on Phys.org
  • #2
made the graph a little better

After calculating the normal and bi normal vector I adjusted the final parameters:
I used 0.1v with v from 0 to 500

This made the curve look a little crisper, but it still has its problems.

The final fernet equation using the normal and bi-normal vectors
w[p_, v_] := a1[p] + 1.0 Sin[.10 v]*an[p] + 1.0 Cos[.10 v]*ab[p];
pp = ParametricPlot3D[w[p, v], {p, 0, 10}, {v, 0, 500*Pi},
PlotRange -> {{-8, 8}, {-8, 8}, {0, 30}}]

Again I think the precision issue is really the problem.
Again any thoughts!

Bob
 
  • #3



It sounds like you may be experiencing issues with the accuracy and precision of your calculations. This can result in choppy or rough graphs, as you have observed. There are a few things you can try to improve the appearance and speed of your graphs in Mathematica.

First, you can try increasing the working precision of your calculations. This can be done by using the SetPrecision function or by adjusting the global precision settings in Mathematica. This will help ensure that your calculations are more accurate and may result in smoother graphs.

Second, you can try using different plotting options in Mathematica, such as increasing the number of plot points or using adaptive sampling. This can help improve the resolution of your graph and make it appear smoother.

Lastly, you may want to consider optimizing your code for speed. This could involve using more efficient algorithms or simplifying your equations to reduce the number of calculations needed. You can also use the Timing function in Mathematica to identify any bottlenecks in your code and work on optimizing those specific areas.

Overall, it may take some trial and error to find the best combination of settings and optimizations for your specific graph. But with a bit of experimentation and tweaking, you should be able to improve the appearance and speed of your graphs in Mathematica.
 

What are choppy graphs in Mathematica?

Choppy graphs in Mathematica refer to graphs that have jagged or uneven lines, making it difficult to interpret the data. This can happen due to a variety of reasons, such as insufficient data points or incorrect settings.

Why do my graphs in Mathematica look choppy?

The most common reason for choppy graphs in Mathematica is not having enough data points. If there are too few data points, the graph will appear jagged. Another reason could be incorrect settings or parameters, such as using a small plot range or a low interpolation order.

How can I fix choppy graphs in Mathematica?

To fix choppy graphs in Mathematica, you can increase the number of data points, adjust the plot range, or change the interpolation order. You can also try using smoothing functions or adjusting the graph's resolution settings.

Can choppy graphs in Mathematica affect the accuracy of my data?

Yes, choppy graphs in Mathematica can affect the accuracy of your data, as the jagged lines can distort the visual representation of the data. It is important to ensure that your graphs are smooth and accurately reflect the data to avoid misinterpretation.

Is there a way to prevent choppy graphs in Mathematica?

Yes, there are several ways to prevent choppy graphs in Mathematica. These include increasing the number of data points, adjusting the plot range, and using appropriate settings for your data. You can also use smoothing functions or interpolation methods to create smoother graphs.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
661
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • Programming and Computer Science
Replies
15
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
Back
Top