Exemplo n.º 1
0
        protected void PlotLine(Point start, Point end, Material material)
        {
            UpdateLimits(GetRelativeElements(start));
            UpdateLimits(GetRelativeElements(end));

            LinePlotter.Plot(parent, start, end, material, lineMesh, PlotUtils.FunctionRadius());
        }
Exemplo n.º 2
0
    private void PlotBorder(List <Point> points)
    {
        for (int i = 1; i < points.Count; i++)
        {
            LinePlotter.Plot(parent, points[i - 1], points[i], lineMaterial, lineMesh, PlotUtils.FunctionRadius());
        }

        LinePlotter.Plot(parent, points.Last(), points.First(), lineMaterial, lineMesh, PlotUtils.FunctionRadius());
    }
Exemplo n.º 3
0
        private static void PlotMarks(GameObject parent, Material material, Mesh mesh, float radius,
                                      double markStart, double markEnd, double step, double proportion, Axis axis)
        {
            double min = step / 2;

            Debug.Log(markStart);
            Debug.Log(step);
            Debug.Log(markEnd);

            for (double i = markStart + step; i < markEnd; i += step)
            {
                if (i != 0 && (markEnd - i) > min)
                {
                    LinePlotter.Plot(parent, MarkPoint(i, axis, proportion, true),
                                     MarkPoint(i, axis, proportion, false), material, mesh, radius);

                    PlotLabel(parent, material, axis, proportion, i);
                }
            }
        }
Exemplo n.º 4
0
        private static void PlotAxis(GameObject parent, Material material, Mesh mesh, float radius,
                                     Interval i, Axis axis)
        {
            double proportion = 0.15 / PlotUtils.scale;
            double step       = GetStep(i, proportion);

            Interval interval = AxisInterval(i, step);

            Point start = GetPoint(interval.a, axis);
            Point end   = GetPoint(interval.b, axis);

            LinePlotter.Plot(parent, start, end, material, mesh, radius);

            ConePlotter.Plot(parent, start, GetPoint(interval.a - (arrowHeight * proportion), axis),
                             arrowBaseScale, arrowPointScale, material);

            ConePlotter.Plot(parent, end, GetPoint(interval.b + (arrowHeight * proportion), axis),
                             arrowBaseScale, arrowPointScale, material);

            PlotMarks(parent, material, mesh, radius, interval.a, interval.b, step,
                      proportion, axis);
        }