Hi,

Here's some code I've been using for spline creation (or bezier curves to be 
more exact);

https://github.com/harism/android_effects/blob/master/src/fi/harism/effects/ViewSplines.java
https://github.com/harism/android_effects/blob/master/res/raw/spline_vs.txt
https://github.com/harism/android_effects/blob/master/res/raw/spline_fs.txt

It's 100% GPU based and the idea is to feed vertex shader with following 
information;

1. 4 control points as uniforms.
2. An vertex array that consists e.g of values [[0.0, -1], [0.0, 1], [0.1, -1], 
[0.1, 1], …. [1.0, 1]]. The first value is used as 't' for interpolating over 
the curve. The more accurate division you provide the more smooth curve will be 
produced. Latter value is used to decide on which side of curve the value is. 
Meaning you can adjust thickness of the rendered curve.

--
H

On Jan 9, 2013, at 11:38 AM, Tamil Maran <tam.mara...@gmail.com> wrote:

> hi 
> 
> i want to draw the curved line and i need to extend and shrink that line 
> using touch event.how to do in opengl
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to