First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked Nov 5 '15

hans gravatar image

how to draw the curve line?

I'm trying to draw a curve. But I do not know how to draw the point y, we ask for help.

![image description] (/upfiles/14467369021107978.jpg)

        int matWidth = 500;
        int matHeight = 500;

        int fromPointX = 1;
        int fromPointY = 200;

        int toPointX = 300;
        int toPointY = 400;

        ArrayList<Point> pointList = new ArrayList<Point>();

        for(int i = fromPointX; i < toPointX; i++) {
            Point point = new Point();
            point.x = i;

            // I do not know how to draw a curve.
            point.y = fromPointY++;
            pointList.add(point);
        }

        for(int i = 1; i < pointList.size(); i++) {
            Core.line(mat, pointList.get(i-1), pointList.get(i),new Scalar(255,255,0), 5);
        }
click to hide/show revision 2
No.2 Revision

how to draw the curve line?

I'm trying to draw a curve. But I do not know how to draw the point y, we ask for help.

![image description] (/upfiles/14467369021107978.jpg)image description

        int matWidth = 500;
        int matHeight = 500;

        int fromPointX = 1;
        int fromPointY = 200;

        int toPointX = 300;
        int toPointY = 400;

        ArrayList<Point> pointList = new ArrayList<Point>();

        for(int i = fromPointX; i < toPointX; i++) {
            Point point = new Point();
            point.x = i;

            // I do not know how to draw a curve.
            point.y = fromPointY++;
            pointList.add(point);
        }

        for(int i = 1; i < pointList.size(); i++) {
            Core.line(mat, pointList.get(i-1), pointList.get(i),new Scalar(255,255,0), 5);
        }
click to hide/show revision 3
No.3 Revision

how to draw the curve line?

I'm trying to draw a curve. But I do not know how to draw the point y, we ask for help.

image description

        int matWidth = 500;
        int matHeight = 500;

        int fromPointX = 1;
50;
        int fromPointY = 200;

        int toPointX = 300;
        int toPointY = 400;

        ArrayList<Point> pointList = new ArrayList<Point>();

        for(int i = fromPointX; i < toPointX; i++) {
            Point point = new Point();
            point.x = i;

            // I do not know how to draw a curve.
            point.y = fromPointY++;
            pointList.add(point);
        }

        for(int i = 1; i < pointList.size(); i++) {
            Core.line(mat, pointList.get(i-1), pointList.get(i),new Scalar(255,255,0), 5);
        }
click to hide/show revision 4
No.4 Revision

how to draw the curve line?

I'm trying to draw a curve. But I do not know how to draw the point y, we ask for help.

image description

        int matWidth = 500;
        int matHeight = 500;

        int fromPointX = 50;
        int fromPointY = 400;

        int toPointX = 300;
        int toPointY = 200;

        int toPointX = 300;
        int toPointY = 400;

        ArrayList<Point> pointList = new ArrayList<Point>();

        for(int i = fromPointX; i < toPointX; i++) {
            Point point = new Point();
            point.x = i;

            // I do not know how to draw a curve.
            point.y = fromPointY++;
            pointList.add(point);
        }

        for(int i = 1; i < pointList.size(); i++) {
            Core.line(mat, pointList.get(i-1), pointList.get(i),new Scalar(255,255,0), 5);
        }

how to draw the curve line?

I'm trying to draw a curve. But I do not know how to draw the point y, we ask for help.

image description

        int matWidth = 500;
        int matHeight = 500;

        int fromPointX = 50;
        int fromPointY = 400;

        int toPointX = 300;
        int toPointY = 200;

        ArrayList<Point> pointList = new ArrayList<Point>();

        for(int i = fromPointX; i < toPointX; i++) {
            Point point = new Point();
            point.x = i;

            // I do not know how to draw a curve.
            point.y = fromPointY++;
            pointList.add(point);
        }

        for(int i = 1; i < pointList.size(); i++) {
            Core.line(mat, pointList.get(i-1), pointList.get(i),new Scalar(255,255,0), 5);
        }

how to draw the curve line?

I'm trying to draw a curve. But I do not know how to draw the point y, we ask for help.

image description

        int matWidth = 500;
        int matHeight = 500;

        int fromPointX = 50;
        int fromPointY = 400;

        int toPointX = 300;
        int toPointY = 200;

        ArrayList<Point> pointList = new ArrayList<Point>();

        for(int i = fromPointX; i < toPointX; i++) {
            Point point = new Point();
            point.x = i;

            // I do not know how to draw a curve.
            point.y = fromPointY++;
            pointList.add(point);
        }

        for(int i = 1; i < pointList.size(); i++) {
            Core.line(mat, pointList.get(i-1), pointList.get(i),new Scalar(255,255,0), 5);
        }