# Tag Info

Accepted

### Finding a parametric curve fitting a two-dimensional dataset

A least squares approach: model = a/((x - x01)^2 + c y^2) + a/((x - x02)^2 + c y^2) $\frac{a}{c y^2+(x-\text{x01})^2}+\frac{a}{c y^2+(x-\text{x02})^2}$ If we ...
• 8,976
Accepted

### return {} when the function is given {}

Actually, I want the output to be {} if there is anything wrong with the argument. For this I recommend one or more definitions with patterns that only match a valid argument, and a fall-through ...
• 272k
Accepted

### How to plot mutiple spiric sections of a torus in a single plot?

To keep the meshstyle, we use {Subdivide[0, 2 Pi, 30], Subdivide[0, 2 Pi, 40]}. We use RegionFunction to cut the plotting to ...
• 77.9k
Accepted

### My 3D plot of a Klein bottle doesn't look right

Here's my slight simplification of the Klein bottle parametric equations. I believe the original parametrization is due to Stewart Dickson (whose depiction of the bottle was in the "Graphics Gallery" ...

### Logarithmic scale in an ParametricPlot obtained from ODE boundary conditions

You can use ScalingFunctions. It appears in red but works. ...
• 16k
Accepted

### Finding the Period of a Limit Cycle

Although it's primarily designed for ecological models, my EcoEvo package can help. First, you need to install it with ...
• 20.3k

### Expand a 2d curve into a 3d path curve with a fixed axis of rotation?

Here is an example of an implementation. First, we get the discretized boundary of the letter (thanks to @cvgmt). Then we calculate the natural parametrization of the boundary curve and construct the ...
• 29.2k

### How to make Region from Spline curve

BSplineCurve+BoundaryDiscretizeGraphics. ...
• 77.9k

### Fitting experimental data by using ParametricNDSolveValue and NonlinearModelFit

A minor change to model eliminates the error cited in the question. (Replace s[t] by s in ...
• 61.8k
Accepted

### How to draw a 3D point moving along a helical path?

You can add a moving point using a combination of options MeshFunctions, Mesh, and Method as ...
• 399k

### Finding the Period of a Limit Cycle

Here is a simple approach to get the period of the unknown limit cycle. The idea is to approximate the limitcycle by a circle (1st harmonic) around the mean of the limitcycle: solution ...
• 55.1k

### How to make Region from Spline curve

curve = BSplineCurve[{{0, 0}, {1, 0}, {2, .5}, {1, 1}, {0, 1}}, SplineClosed -> True]; region = DiscretizeGraphics @ Graphics[FilledCurve @ curve] ...
• 82.2k
Accepted

### Finding "nice" solution for under-determined system with constraint?

If I understand the question correctly, you wish to obtain a parameterized solution {U2[U1], W2[W1]} from the equation in the question, so that you can vary that ...
• 61.8k
Accepted

### Shading the surface of the 3D plot

Perhaps, this is what you had in mind. ...
• 61.8k
Accepted

Curvature of a parabola depends on the position. To find curvature at the maximum point do ArcCurvature[{t,fit[t]},t]/.Maximize[fit[t],t][[2]] (*0.0170112*)
• 19.2k

### Obtaining the curve parallel to the function a/(x^2+b)

Use FrenetSerretSystem. ...
• 77.9k

### 2D cross-section of ParametricPlot3D

We can use the MeshFunctions options and extract the slice data accordingly. ...
• 36.4k

### Plotting Limit Cycle

Hopf bifurcation analysis The differential system: ...
• 28.3k

### My 3D plot of a Klein bottle doesn't look right

Description For fun, thought I give it a try. Below is an example of my attempt to Plot Kleins bottle. Code ...
• 5,979

### My 3D plot of a Klein bottle doesn't look right

This is just to give a solution based on minimal correction of the OP's code. ...
• 108k

### How to plot Compressibility factor Z vs Pressure P using ParametricPlot?

The plot you were trying to reproduce is a plot of the reduced van der Waals equation; that is, it is using the reduced pressure $P_r=\frac{P}{P_c}$ and reduced temperature $T_r=\frac{T}{T_c}$ as the ...

Here's I think a generalization of what Ulrich gave to an arbitrary $(p, q)$ torus (if I read Wikipedia right): ...
• 47k

### How to visualize a 4-dimensional parametric surface?

A simple minded possibility is to use a perspective projection (similar to what I did here). Applied to the 4D Klein bottle, we have ...

### Solving a non-linear ODE system with ParametricNDSolveValue

This problem has a solution. It is given below ...
• 46.7k
Accepted

### RevolutionPlot3D: get graphics primitives

Use Cases to extract the GraphicsComplex from the plot: ...
• 69.3k
Accepted

### Solve can't solve my trigonometric equation—why?

Solve, NSolve as well as FindRoot can solve this equation, one should only remember several ...
• 57.6k
Accepted

### Replace elements of a list based on a function

To answer your question directly, a loop could be written like this: f = Table[3*k*k, {k, 1, 16}]; Do[ f[[4 i + j]] = 1; , {i, {1, 3}}, {j, 1, 4} ]; f {...
• 70.9k
Accepted

### Olympic Athletics Track

Here's my attempt without using formulae but using a StadiumShape discretization instead, mainly to show another way to do it for better performance: ...
• 25.6k

### Is Function broken is this example?

The Details section of the documentation for Function states: Function is analogous to λ in LISP or formal logic. Now this is ...
• 69.1k