Mathematical graphics (2.11) curve graphics posted on the ball

Source: Internet
Author: User

We have released a number of two-dimensional curve graphs. In fact, all two-dimensional graphs can be converted into three-dimensional images by adding one dimension value. the content of this section is to post a two-dimensional curve to a sphere to generate a three-dimensional curve.

The following formula is used to generate the value of the third dimension:

Y = SQRT (A * A-x * X-z * z)

 

Here is an example of a two-dimensional curve:

Mathematical graphics (1.27) flowers

Cyclic-harmonic_sphere

vertices = 12000t = from 0 to (40*PI)a = 10e = 1n = rand2(0.1, 10);p = a*(1 + e*cos(n*t))x = p*cos(t)z = p*sin(t)r = array_max(p)y = sqrt(r*r - p*p)

Folioide_sphere

#http://www.mathcurve.com/courbes2d/folioide/folioide.shtmlvertices = 12000t = from (-20*PI) to (20*PI)e = rand2(0.1, 10)a = 10 / ei = rand_int2(2, 10)j = rand_int2(1, 10)n = i/jp = a*(e*cos(n*t) + sign(t)*e*sqrt(1 - pow(cos(n*t), 2)))x = p*cos(t)z = p*sin(t)r = array_max(p)y = sqrt(r*r - x*x - z*z)

 

Change the radius to generate a grass hat curve.

Cyclic-harmonic_hat

vertices = 12000t = from 0 to (40*PI)a = 10e = 1n = rand2(0.1, 10);p = a*(1 + e*cos(n*t))x = p*cos(t)z = p*sin(t)y = sqrt(a*a - x*x - z*z)

The color I set for my hat is not very good when I cut the graph. I didn't realize it until I cut the last graph.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.