Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #32853 > unrolled thread

Bezier curves javascript

Started byjonas.thornvall@gmail.com
First post2017-03-27 09:34 -0700
Last post2017-04-03 02:21 -0700
Articles 11 — 2 participants

Back to article view | Back to comp.lang.javascript


Contents

  Bezier curves javascript jonas.thornvall@gmail.com - 2017-03-27 09:34 -0700
    Re: Bezier curves javascript jonas.thornvall@gmail.com - 2017-03-27 09:44 -0700
      Re: Bezier curves javascript jonas.thornvall@gmail.com - 2017-03-27 09:49 -0700
        Re: Bezier curves javascript jonas.thornvall@gmail.com - 2017-03-29 09:50 -0700
    Re: Bezier curves javascript Flng Fck <nothanks@invalid.invalid> - 2017-03-30 13:00 +0200
      Re: Bezier curves javascript jonas.thornvall@gmail.com - 2017-03-30 04:39 -0700
        Re: Bezier curves javascript jonas.thornvall@gmail.com - 2017-03-30 06:32 -0700
        Re: Bezier curves javascript jonas.thornvall@gmail.com - 2017-03-30 06:35 -0700
          Re: Bezier curves javascript jonas.thornvall@gmail.com - 2017-03-30 16:09 -0700
        Re: Bezier curves javascript Flng Fck <nothanks@invalid.invalid> - 2017-04-03 10:49 +0200
          Re: Bezier curves javascript jonas.thornvall@gmail.com - 2017-04-03 02:21 -0700

#32853 — Bezier curves javascript

Fromjonas.thornvall@gmail.com
Date2017-03-27 09:34 -0700
SubjectBezier curves javascript
Message-ID<ca459e88-12a9-479c-8696-29d9f7614288@googlegroups.com>
I was thinking adding bezier curves but when i look at the functions bezierCurveTo() and quadraticCurveTo() they only take one or two parameters?

I think i remember from doing bezier curves in pascal, tha you basicly could have any number of points?

If so what is the reason for the functions just holding one or two points for the curve?

If you bother implement it why restrain what you can do with it?
http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg

[toc] | [next] | [standalone]


#32854

Fromjonas.thornvall@gmail.com
Date2017-03-27 09:44 -0700
Message-ID<1ff24992-1aa9-45a8-b67b-52547c100388@googlegroups.com>
In reply to#32853
Den måndag 27 mars 2017 kl. 18:34:57 UTC+2 skrev jonas.t...@gmail.com:
> I was thinking adding bezier curves but when i look at the functions bezierCurveTo() and quadraticCurveTo() they only take one or two parameters?
> 
> I think i remember from doing bezier curves in pascal, tha you basicly could have any number of points?
> 
> If so what is the reason for the functions just holding one or two points for the curve?
> 
> If you bother implement it why restrain what you can do with it?
> http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg

I think i use the builtin one for making cuved  "between nodes" but make my own for actual reshaping of a full graph. 

I do not quite understand doesn't a curve flow require you take consideration to all the previous vertices not just add an extra point or two between two vertices? 

It was a long time since i programmed bezier so i really do not have an idea.

[toc] | [prev] | [next] | [standalone]


#32855

Fromjonas.thornvall@gmail.com
Date2017-03-27 09:49 -0700
Message-ID<23f4a68d-90ba-4370-9de7-58920756e960@googlegroups.com>
In reply to#32854
Den måndag 27 mars 2017 kl. 18:44:41 UTC+2 skrev jonas.t...@gmail.com:
> Den måndag 27 mars 2017 kl. 18:34:57 UTC+2 skrev jonas.t...@gmail.com:
> > I was thinking adding bezier curves but when i look at the functions bezierCurveTo() and quadraticCurveTo() they only take one or two parameters?
> > 
> > I think i remember from doing bezier curves in pascal, tha you basicly could have any number of points?
> > 
> > If so what is the reason for the functions just holding one or two points for the curve?
> > 
> > If you bother implement it why restrain what you can do with it?
> > http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg
> 
> I think i use the builtin one for making cuved  "between nodes" but make my own for actual reshaping of a full graph. 
> 
> I do not quite understand doesn't a curve flow require you take consideration to all the previous vertices not just add an extra point or two between two vertices? 
> 
> It was a long time since i programmed bezier so i really do not have an idea.

I can't restrain myself it probably was restrict,confine or limit i meant.

[toc] | [prev] | [next] | [standalone]


#32859

Fromjonas.thornvall@gmail.com
Date2017-03-29 09:50 -0700
Message-ID<55088a2f-0e31-43f5-b534-3e1d6a882f2e@googlegroups.com>
In reply to#32855
Den måndag 27 mars 2017 kl. 18:49:12 UTC+2 skrev jonas.t...@gmail.com:
> Den måndag 27 mars 2017 kl. 18:44:41 UTC+2 skrev jonas.t...@gmail.com:
> > Den måndag 27 mars 2017 kl. 18:34:57 UTC+2 skrev jonas.t...@gmail.com:
> > > I was thinking adding bezier curves but when i look at the functions bezierCurveTo() and quadraticCurveTo() they only take one or two parameters?
> > > 
> > > I think i remember from doing bezier curves in pascal, tha you basicly could have any number of points?
> > > 
> > > If so what is the reason for the functions just holding one or two points for the curve?
> > > 
> > > If you bother implement it why restrain what you can do with it?
> > > http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg
> > 
> > I think i use the builtin one for making cuved  "between nodes" but make my own for actual reshaping of a full graph. 
> > 
> > I do not quite understand doesn't a curve flow require you take consideration to all the previous vertices not just add an extra point or two between two vertices? 
> > 
> > It was a long time since i programmed bezier so i really do not have an idea.
> 
> I can't restrain myself it probably was restrict,confine or limit i meant.

How come javascript Bezier only take two points as argument?

[toc] | [prev] | [next] | [standalone]


#32865

FromFlng Fck <nothanks@invalid.invalid>
Date2017-03-30 13:00 +0200
Message-ID<obiob6$ade$1@dont-email.me>
In reply to#32853
Il 27/03/2017 18:34, jonas.thornvall@gmail.com ha scritto:
> I was thinking adding bezier curves but when i look at the functions bezierCurveTo() and quadraticCurveTo() they only take one or two parameters?
>
> I think i remember from doing bezier curves in pascal, tha you basicly could have any number of points?
>
> If so what is the reason for the functions just holding one or two points for the curve?
>
> If you bother implement it why restrain what you can do with it?
> http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg


This one takes 6 parameters

https://developer.mozilla.org/it/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo

[toc] | [prev] | [next] | [standalone]


#32866

Fromjonas.thornvall@gmail.com
Date2017-03-30 04:39 -0700
Message-ID<98f85b5b-25b2-4fb2-b6d7-7157d668b09a@googlegroups.com>
In reply to#32865
Den torsdag 30 mars 2017 kl. 13:00:44 UTC+2 skrev Flng Fck:
> Il 27/03/2017 18:34, jonas.thornvall@gmail.com ha scritto:
> > I was thinking adding bezier curves but when i look at the functions bezierCurveTo() and quadraticCurveTo() they only take one or two parameters?
> >
> > I think i remember from doing bezier curves in pascal, tha you basicly could have any number of points?
> >
> > If so what is the reason for the functions just holding one or two points for the curve?
> >
> > If you bother implement it why restrain what you can do with it?
> > http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg
> 
> 
> This one takes 6 parameters
> 
> https://developer.mozilla.org/it/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo

No that is just 1 control point.
But maybe the trick is doing the calculation of the points that make up the curve separate, but strangely i thought they all had effect on eachother, but maybe that is not how Bezier curves work. I was so sure that what i programmed in both basic, pascal and java did take any number of points. It seem strange to me that only the neighbour point would affect the full curve?

[toc] | [prev] | [next] | [standalone]


#32876

Fromjonas.thornvall@gmail.com
Date2017-03-30 06:32 -0700
Message-ID<a0575cff-9c55-4acc-a079-9c5e11bfac6f@googlegroups.com>
In reply to#32866
Den torsdag 30 mars 2017 kl. 13:39:30 UTC+2 skrev jonas.t...@gmail.com:
> Den torsdag 30 mars 2017 kl. 13:00:44 UTC+2 skrev Flng Fck:
> > Il 27/03/2017 18:34, jonas.thornvall@gmail.com ha scritto:
> > > I was thinking adding bezier curves but when i look at the functions bezierCurveTo() and quadraticCurveTo() they only take one or two parameters?
> > >
> > > I think i remember from doing bezier curves in pascal, tha you basicly could have any number of points?
> > >
> > > If so what is the reason for the functions just holding one or two points for the curve?
> > >
> > > If you bother implement it why restrain what you can do with it?
> > > http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg
> > 
> > 
> > This one takes 6 parameters
> > 
> > https://developer.mozilla.org/it/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo
> 
> No that is just 1 control point.
> But maybe the trick is doing the calculation of the points that make up the curve separate, but strangely i thought they all had effect on eachother, but maybe that is not how Bezier curves work. I was so sure that what i programmed in both basic, pascal and java did take any number of points. It seem strange to me that only the neighbour point would affect the full curve?

Probably one would start with something simple like a regular polygon, and take it from there.

[toc] | [prev] | [next] | [standalone]


#32877

Fromjonas.thornvall@gmail.com
Date2017-03-30 06:35 -0700
Message-ID<f6207f6c-be1d-4844-8024-fd896964098b@googlegroups.com>
In reply to#32866
Den torsdag 30 mars 2017 kl. 13:39:30 UTC+2 skrev jonas.t...@gmail.com:
> Den torsdag 30 mars 2017 kl. 13:00:44 UTC+2 skrev Flng Fck:
> > Il 27/03/2017 18:34, jonas.thornvall@gmail.com ha scritto:
> > > I was thinking adding bezier curves but when i look at the functions bezierCurveTo() and quadraticCurveTo() they only take one or two parameters?
> > >
> > > I think i remember from doing bezier curves in pascal, tha you basicly could have any number of points?
> > >
> > > If so what is the reason for the functions just holding one or two points for the curve?
> > >
> > > If you bother implement it why restrain what you can do with it?
> > > http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg
> > 
> > 
> > This one takes 6 parameters
> > 
> > https://developer.mozilla.org/it/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo
> 
> No that is just 1 control point.
> But maybe the trick is doing the calculation of the points that make up the curve separate, but strangely i thought they all had effect on eachother, but maybe that is not how Bezier curves work. I was so sure that what i programmed in both basic, pascal and java did take any number of points. It seem strange to me that only the neighbour point would affect the full curve?

Probably should saved the code.

[toc] | [prev] | [next] | [standalone]


#32887

Fromjonas.thornvall@gmail.com
Date2017-03-30 16:09 -0700
Message-ID<74c3038a-a55d-424a-93bc-ea1676f46309@googlegroups.com>
In reply to#32877
Den torsdag 30 mars 2017 kl. 15:35:51 UTC+2 skrev jonas.t...@gmail.com:
> Den torsdag 30 mars 2017 kl. 13:39:30 UTC+2 skrev jonas.t...@gmail.com:
> > Den torsdag 30 mars 2017 kl. 13:00:44 UTC+2 skrev Flng Fck:
> > > Il 27/03/2017 18:34, jonas.thornvall@gmail.com ha scritto:
> > > > I was thinking adding bezier curves but when i look at the functions bezierCurveTo() and quadraticCurveTo() they only take one or two parameters?
> > > >
> > > > I think i remember from doing bezier curves in pascal, tha you basicly could have any number of points?
> > > >
> > > > If so what is the reason for the functions just holding one or two points for the curve?
> > > >
> > > > If you bother implement it why restrain what you can do with it?
> > > > http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg
> > > 
> > > 
> > > This one takes 6 parameters
> > > 
> > > https://developer.mozilla.org/it/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo
> > 
> > No that is just 1 control point.
> > But maybe the trick is doing the calculation of the points that make up the curve separate, but strangely i thought they all had effect on eachother, but maybe that is not how Bezier curves work. I was so sure that what i programmed in both basic, pascal and java did take any number of points. It seem strange to me that only the neighbour point would affect the full curve?
> 
> Probably should saved the code.

Something just popped up in my brain that the curve i talk about could be sensitive information, because it could be built in to ballistic robotics to assure you really hit a moving object?

[toc] | [prev] | [next] | [standalone]


#32911

FromFlng Fck <nothanks@invalid.invalid>
Date2017-04-03 10:49 +0200
Message-ID<obt24v$vb5$1@dont-email.me>
In reply to#32866
Il 30/03/2017 13:39, jonas.thornvall@gmail.com ha scritto:
> If so what is the reason for the functions just holding one or two 
> points for the curve?
>>> If you bother implement it why restrain what you can do with it?
>>> http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg
>>
>> This one takes 6 parameters
>>
>> https://developer.mozilla.org/it/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo
> No that is just 1 control point.

Plus the 2 extremes of the curve.

[toc] | [prev] | [next] | [standalone]


#32912

Fromjonas.thornvall@gmail.com
Date2017-04-03 02:21 -0700
Message-ID<9902b803-8bff-47ce-9912-305e9b1375f8@googlegroups.com>
In reply to#32911
Den måndag 3 april 2017 kl. 10:49:29 UTC+2 skrev Flng Fck:
> Il 30/03/2017 13:39, jonas.thornvall@gmail.com ha scritto:
> > If so what is the reason for the functions just holding one or two 
> > points for the curve?
> >>> If you bother implement it why restrain what you can do with it?
> >>> http://www.e-cartouche.ch/content_reg/cartouche/graphics/en/image/curves/giger2.jpg
> >>
> >> This one takes 6 parameters
> >>
> >> https://developer.mozilla.org/it/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo
> > No that is just 1 control point.
> 
> Plus the 2 extremes of the curve.

I did fix the plot of marked up nodes into beziercurves, next step to put/lay out the control points so that you can freehand shape the curve.


http://anybase.co.nf

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web