绘制二维曲线Android的印刷品吗? [英] Drawing 2D curves in Android canvas?

查看:197
本文介绍了绘制二维曲线Android的印刷品吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们怎样绘制二维曲线,像这样的画布

How we can draw 2D curves like this in Canvas?

所有类似的曲线有数学公式或者分形,但在画布上只有一些方法绘制简单的形状像三角形或矩形。我知道,大多数的曲线可以划分为简单的形状,如与绘制心曲线,但是否有更简单的方法来绘制2D曲线与画布?

All similar curves have mathematical formula or are fractals, but the canvas only has some methods for drawing simple shapes like a triangle or rectangle. I know that most curves can divide into simpler shapes such as with drawing a Heart Curve, but is there an easier way to draw 2D curves with the canvas?

推荐答案

如果你看看如何绘制2D曲线,一般你要么是画的点和线,它不仅外表光滑。

If you look up how to draw 2D curves in general you'll either be drawing points or lines and it only looks smooth.

您的问题有两个参数的形式和一个分形形态。所有可以被绘制的线和点。参数化形式可以直接通过算法您的问题进行或有可能转化为更一般的像贝塞尔曲线所提到的@leenephi

Your question has two parametric forms and one fractal form. All can be drawn with lines and points. The parametric forms can be done directly via the algorithms in your question or could be transformed into more general ones like the Bezier curve as mentioned by @leenephi

大多数公式/算法生成的不规则碎片形所使用线的时候,科赫雪花,或者点,Mandelbrot集。如果你真正了解如何生成它们,你会看到,分形是少谈画'曲线',更多的是过程(递归)和结果(自相似)。

Most of the time the equations/algorithms for generating fractals are using lines, Koch Snowflake, or points, the Mandelbrot set. If you actually understand how to generate them, you'll see that fractals are less about drawing 'a curve' and more about process (recursion) and results (self-similarity).

这篇关于绘制二维曲线Android的印刷品吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆