# Draw a "love" in C language

Source: Internet
Author: User

`/* Each main function represents a shape */#include <iostream>using namespacestd; #include<stdio.h>#include<math.h>/*int main (void) {for (Float y = 1.5f;y > -1.5f;y-= 0.06f) {for (float x = -1.5f;x < 1.5f;x + = 0.03f) {            float A = x * x + y * y-1; Putchar (A * A * a-x * x * y * y * y <= 0.0f? ')        ^ ': ');    } putchar (' \ n '); } return 0;}*//*int Main () {for (float y = 1.5f; y > -1.5f; y-= 0.1f) {for (float x = -1.5f; x < 1.5f; x + = 0.05f)            {Float z = x * x + y * y-1;            float F = z * z * z-x * x * y * y * y; Putchar (f <= 0.0f?)        ". ^-=+*" [(int) (f * -8.0f)]: ');    } putchar (' \ n '); }}*//*float F (float x, float y, float z) {Float a = x * x + 9.0f/4.0f * y * y + z * z-1; Return a * A * a-x * x * z * z * z-9.0f/80.0f * y * y * z * z * z;}    Float h (float x, float z) {for (float y = 1.0f; y >= 0.0f; y-= 0.001f) if (f (x, Y, z) <= 0.0f) return y; return 0.0f;}            int main () {for (float z = 1.5f; z > -1.5f; z-= 0.06f) {for (float x = -1.5f; x < 1.5f; x + = 0.03f) {            Float v = f (x, 0.0f, z);                if (v <= 0.0f) {Float y0 = h (x, z);                float NY = 0.01f;                float NX = h (x + NY, z)-y0;                float NZ = h (x, z + NY)-y0;                float nd = 1.0F/SQRTF (NX * NX + NY * NY + NZ * NZ);                Float D = (nx + ny-nz) * nd * 0.5f + 0.5f;            Putchar (".:-=+*#%@" [(int) (d * 5.0f)]);        } else Putchar (");    } putchar (' \ n '); }}*/`

Draw a "love" in C language

Related Keywords:
Related Article

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.