Questions tagged [quadratic-curve]

a quadratic polynomial

It is advised to use .

40 questions
8
votes
1 answer

Points on a Quadratic Curve using Processing (p5.js)

I am using this formula to calculate the points on a quadratic curve: cPx2 = (1-t)*(1-t)* x1+2 * (1-t)*t*qcX + t*t*x2; cPy2 = (1-t)*(1-t)* y1+2 * (1-t)*t*qcY + t*t*y2; When I set t = 10 and iterate through the curves, I get this: It looks like…
glaemart
  • 129
  • 1
  • 10
3
votes
1 answer

UIBezierPath Quadratic Curve is a Straight Line

I'm trying to create a curved arrow for displaying in ab ARKit scene, however, the curvature of the arrow staff is just rendering as a straight line on both sides. func createTurnArrow(_ direction: Direction) -> SCNShape { let path =…
m_callens
  • 6,100
  • 8
  • 32
  • 54
3
votes
2 answers

Quadratic function for increment speedup of countup

I'm writing a jQuery plugin for fast-counting up to a value when a page loads. Since javascript can't run as fast as I want it to for larger numbers, I want to increase the increment step so that it completes within a given timeframe, so I'd need a…
Mikau
  • 99
  • 6
2
votes
1 answer

Plot a quadratic curve as a function of y on a scatterplot

I am using JFreeCharts to plot a scatterplot in Java. I am using PolynomialFunction2D to plot a quadratic regression line, over the scatterplot. PolynomialFunction2D can be used to plot quadratic curves, that are defined as a function of x, ie, y =…
Aish
  • 69
  • 9
2
votes
2 answers

Drawing the quadratic equation curve in c#

I am very new to c# System Draw so please do help me on my code. i am trying to plot the quadratic equation curve and is using the "for" loop in order to dot 10 coordinates for the curve. i have tested out this code many times and nothing ever…
RabbitBadger
  • 539
  • 7
  • 19
2
votes
1 answer

non linear regression 'abline'

Still quite new to R (and statistics to be honest) and I have currently only used it for simple linear regression models. But now one of my data sets clearly shows a inverted U pattern. I think I have to do a quadratic regression analysis on this…
user1466195
  • 51
  • 1
  • 1
  • 4
1
vote
0 answers

How can I draw a quadratic curve that is going through a certain control point

I'm trying to draw a quadratic curve that has movable control points on the canvas. Everything is okay but how can I draw a quadratic curve that is going through a certain control point? I tried this: const startPoints = [0,0]; const controlPoints =…
mediumgoal
  • 11
  • 1
1
vote
3 answers

Optimize quadratic curve tracing using numeric methods

I am trying to trace quadratic bezier curves, placing "markers" at a given step length distance. Tried to do it a naive way: const p = toPoint(map, points[section + 1]); const p2 = toPoint(map, points[section]); const {x: cx, y: cy} =…
Igor Shmukler
  • 1,742
  • 3
  • 15
  • 48
1
vote
0 answers

quadraticBezierTo Mirroring in Flutter

I'm very new to flutter and I have been trying to create a modern drawer, and I have found one, the problem is the one I have found usesquadraticBezierTo and enddrawerwhich opens the drawer on the right to left but want to usedrawer which opens the…
aiden
  • 41
  • 5
1
vote
1 answer

What is the best way to add 1000 regression lines to a ggplot? (Model-based bootstrapping)

From a bootstrapping model I have 1000 sets of coefficients for this regression model: y = b0 + b1x + b2(x^2) What is the function call to plot a quadratic line if I already have the coefficients? I.E. I do not want to "fit" a linear model to my…
jbpib27
  • 33
  • 4
1
vote
2 answers

UIBezierPath not equally fat everywhere and cut off

I am trying to draw a line with a smooth quadratic curve attached to its end. Therefore, I am using this code: import Foundation import UIKit class IndicatingView: UIView { var path: UIBezierPath! override init(frame: CGRect) { …
linus_hologram
  • 1,595
  • 13
  • 38
1
vote
1 answer

Fitting a function f(x,y,z) with a quadratic polynomial

I'm trying to fit a function f(x,y,z) with the following quadratic polynomial: 3d polynomial Some distorted spherical surface in three dimensions. The problem is related to the calculation of effective masses in solid state physics. Here is a…
1
vote
1 answer

How can I make a 3D plot in matplotlib of an ellipsoid defined by a quadratic equation?

I have the general formula of an ellipsoid: A*x**2 + C*y**2 + D*x + E*y + B*x*y + F + G*z**2 = 0 where A,B,C,D,E,F,G are constant factors. How can I plot this equation as a 3D plot in matplotlib? (A wireframe would be best.) I saw this example but…
kamton
  • 11
  • 1
  • 3
1
vote
1 answer

Quadratic curve not rendered correctly on different devices

I'm trying to draw a bezier path with a quadratic curve in the middle. The curve works well on iPhone 8 and XS, but is not responsive (i.e. not rendered correctly) on other devices. Below is the image of the curve in iPhone XS (correct) and iPhone…
hrtlkr29
  • 383
  • 1
  • 7
  • 21
1
vote
1 answer

Multiple least squares quadratic fit in ggplot

Notice that your graphic constructed from Problem 4 shows a quadratic or curved relationship between log_wages against exp. The next task is to plot three quadratic functions for each race level "black", "white" and "other". To estimate the…
1
2 3