Questions tagged [parametric-equations]

A parametric equation is a mathematical definition of a set of values defined by a function of one or several parameters. They are frequently used for defining curves by using a parametrized function defining the coordinates of the curve's points.

A parametric equation is a mathematical definition of a set of values defined by a function of one or several parameters. They are frequently used for defining curves by using a parametrized function defining the coordinates of the curve's points.

External reference:

101 questions
40
votes
8 answers

Plot a heart in R

Possible Duplicate: Equation-driven smoothly shaded concentric shapes How could I plot a symmetrical heart in R like I plot a circle (using plotrix) or a rectangle? I'd like code for this so that I could actually do it for my self and to be…
Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
20
votes
2 answers

Equation-driven smoothly shaded concentric shapes

Background Looking to create interesting video transitions (in grayscale). Problem Given equations that represent a closed, symmetrical shape, plot the outline and concentrically shade the shape towards its centre. Example Consider the following…
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
16
votes
2 answers

Plot survival and hazard function of survreg using curve()

I have the following survreg model: Call: survreg(formula = Surv(time = (ev.time), event = ev) ~ age, data = my.data, dist = "weib") Value Std. Error z p (Intercept) 4.0961 0.5566 7.36 1.86e-13 age 0.0388 …
user1252482
11
votes
1 answer

Recursive arc-length reparameterization of an arbitrary curve

I have a 3D parametric curve defined as P(t) = [x(t), y(t), z(t)]. I'm looking for a function to reparametrize this curve in terms of arc-length. I'm using OpenSCAD, which is a declarative language with no variables (constants only), so the solution…
10
votes
1 answer

How can I find a normal vector of a 2D line?

I have a line with point a, (6, 12) and point b (45, 18). To describe this line using vectors, the equation is L = [6, 12] +t [39, 6] How would I go about finding the normal to this line?
Ian McLeod
  • 123
  • 1
  • 1
  • 3
7
votes
1 answer

Fitting Parametric Curves in Python

I have experimental data of the form (X,Y) and a theoretical model of the form (x(t;*params),y(t;*params)) where t is a physical (but unobservable) variable, and *params are the parameters that I want to determine. t is a continuous variable, and…
Necarion
  • 105
  • 1
  • 6
7
votes
3 answers

How to plot polar coordinates in R?

Suppose that (x(t),y(t)) has polar coordinates(√t,2πt). Plot (x(t),y(t)) for t∈[0,10]. There is no proper function in R to plot with polar coordinates. I tried normal plot by giving, x=√t & y=2πt. But resultant graph was not as expected. I got this…
Athul
  • 83
  • 1
  • 1
  • 4
5
votes
1 answer

Parametric equation with numpy

I'm currently implementing a Recurrent Neural Network (RNN) called Echo State Network (ESN) in python for Time Series Classification (TSC). I want to generate trajectories using parametric equations, then train my neural network to classify these…
NiziL
  • 5,068
  • 23
  • 33
5
votes
1 answer

How to convert Parametric equation to Cartesian form

I need to convert a plane's equation from Parametric form to Cartesian form. For example: (1, 2, -1) + s(1, -2, 3) + t(1, 2, 3) to: ax+yb+cz+d=0 So basically, my question is: how do I find the a, b, c and d, and what's the logic behind the…
DMEM
  • 1,573
  • 8
  • 25
  • 43
4
votes
1 answer

How to draw a parametric curve in ggplot2

I'd like to draw a parametric curve in ggplot2. When drawing just points, where ordering doesn't matter, it works OK: library(ggplot2) phi = seq(0, 2*pi, length.out=100) df1 = data.frame(x=(phi+3)*cos(phi), y=(phi+3)*sin(phi)) ggplot(data=df1,…
Igor F.
  • 2,649
  • 2
  • 31
  • 39
4
votes
0 answers

GLSL Parametric Curve Plotter

I am trying to implement a parametric curve plotter on a fragment shader in GLSL. I managed to make a rudimentary one by iterating the parameter and drawing a circle for each computed position. You can find the (working and commented) code here.…
apazat
  • 41
  • 4
3
votes
2 answers

How to plot the variable cross-section of a cylinder?

x = r*cos(t) + ur*cos(t) y = r*sin(t) + ur*sin(t) z = zeros(length(x)) Cylinder length is along the z direction from 0 to 10. The variable ur changes with each value of z. It represents a variable thickness of the cylinder. I tried plot3()…
Raza Mehdi
  • 35
  • 7
3
votes
1 answer

Plotting a set of parametric equations with several parameters in Julia

To plot a circle of radius 2 centered at (1, 1) I do the following: θ = 0:0.1:2π x = 1 .+ 2cos.(θ) y = 1 .+ 2sin.(θ) plot(x, y, aspect_ratio=:equal) However, if I want to plot a set of parametric equations with more than two parameters I cannot use…
K. Claesson
  • 603
  • 8
  • 22
3
votes
1 answer

Placing points equidistantly along an Archimedean spiral

I have an Archimedean spiral determined by the parametric equations x = r t * cos(t) and y = r t * sin(t). I need to place n points equidistantly along the spiral. The exact definition of equidistant doesn't matter too much - it only has to be…
snazzybouche
  • 2,241
  • 3
  • 21
  • 51
3
votes
1 answer

How to use this complex parametric equation to draw curve in iOS

just found this demo code to using parametric equation draw in iOS you can see that key code is to generate this array of points let points: [CGPoint] = 0.stride(to: M_PI * 2, by: 0.01).map { let x = pow(sin($0), 3) var y = 13 * cos($0) …
dispute
  • 1,424
  • 13
  • 17
1
2 3 4 5 6 7