Questions tagged [quadratic-curve]

a quadratic polynomial

It is advised to use .

40 questions
0
votes
1 answer

How to approximate OCTANT of a circle using QUADRATIC Bezier curve?

In a vector graphics program I am writing using Java, ideally any shape would be represented by a modified form of the Path2D class, which uses quadratic Bezier curves. Ideally ellipses would be represented as Path2D objects as well. There is heavy…
J Ray
  • 11
0
votes
1 answer

Run a circle through the points of a quadric curve with JavaScript and Canvas

I want to run a circle through every point of a quadric curve because I'm making a circle-throw game. This is an example code of my problem: canvas.width = 200; canvas.height = 200; ctx =…
Tamás
  • 950
  • 2
  • 10
  • 29
0
votes
1 answer

How to draw a graph using parbola equation

I am trying to create a graph using parabola equation (y=x*x). But I am bit confused to calculate the value for control point. How should I calculate the control point value. My JavaScript function: function drawParabola() { ctx.beginPath(); …
nisar
  • 1,055
  • 2
  • 11
  • 26
0
votes
1 answer

Rotating around a fixed point from current position

Need to move a sprite around a fixed point. The caveat is, the motion should start from the 'current position' of the sprite. Offsetting the angle i.e.using magic numbers, doesn't really do it since it will be different in case the distance between…
0
votes
0 answers

Multiplication of canvas lineTo coordinates performance?

multiplication of canvas line coordinates, is there anyway to lose the multiplication of the coordinates? Like for each object in the rects and rects2, the computer would have calculated all the possible outcomes before the code starts? full code…
0
votes
1 answer

R: generate plot for multiple regression model with interaction between polynomial numeric predictor and factor

I am trying to generate a plot derived from my data and a multiple regression model run on these data. I am having trouble getting everything that I need plotted together within one graph however (i.e, raw data points + fitted lines + 95% CI's). In…
0
votes
1 answer

KineticJS Bounding Box for Quadratic Curve

I have implemented a class that uses the quadline that is shown in the Modify Curves With Anchor Points tutorial. this.shape = new Kinetic.Shape({ drawFunc: function(canvas) { var context = canvas.getContext(); context.beginPath(); …
stats
  • 455
  • 4
  • 18
0
votes
1 answer

Better way to draw a quadratic Curve in KineticJS?

I am writing an app in which I have to draw a lot of draggable quadratic curves. I am using Kinetic.Shape for this (KineticJS 4.4.3). Since the performance is not great I tried to analyze and optimize the code and found out that the drawFunc…
solitud
  • 683
  • 5
  • 15
0
votes
2 answers

How do you cut a quadratic curve in half?

I'm trying to draw half of an existing quadratic curve, though I'm not sure how to adjust the control-point to do so: http://jsfiddle.net/s6sB8/3/ You'll see the top half of a rounded rectangle drawn in canvas, and a box with a top CSS borders. …
user578895
-1
votes
2 answers

How to draw a pointed SVG bezier curves

I am new to SVG and want to have a curve with pointed ends like the following image in svg code (using a python svg library): Is there any way to achieve this using a bezier curve, or is there a possibility to draw a normal bezier curve and modify…
Student
  • 708
  • 4
  • 11
1 2
3