1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > 浪漫表白c语言程序玫瑰 c语言玫瑰告白代码

浪漫表白c语言程序玫瑰 c语言玫瑰告白代码

时间:2022-03-04 01:20:16

相关推荐

浪漫表白c语言程序玫瑰 c语言玫瑰告白代码

作为资深趣味寻找者,这次有一个好程序分享。

#include

#include

#include

#include

#include

#pragma comment(lib,"winmm.lib")

//定义全局变量

int rosesize = 500;

int h = -250;

//定义结构体

struct DOT

{

double x;

double y;

double z;

double r;

double g;

};

bool calc(double a,double b,double c,DOT &d)

{

double j, n, o, w, z;

//花柄

if (c > 60)

{

d.x = sin(a * 7)*(13 + 5 / (0.2 + pow(b * 4, 4))) - sin(b) * 50;

d.y = b*rosesize + 50;

d.z = 625 + cos(a * 7)*(13 + 5 / (0.2 + pow(b * 4, 4))) + b * 400;

d.r = a * 1 - b / 2;

d.g = a;

return true;

}

double A = a * 2 - 1;

double B = b * 2 - 1;

if (A*A + B*B < 1)

{

//绿叶

if (c > 37)

{

j = (int(c) & 1);

n = j ? 6 : 4;

o = 0.5 / (a + 0.01) + cos(b * 125) * 3 - a * 300;

w = b * h;

d.x = o * cos(n) + w * sin(n) + j * 610 - 390;

d.y = o * sin(n) - w * cos(n) + 550 - j * 350;

d.z = 1180 + cos(B + A) * 99 - j * 300;

d.r = 0.4 - a * 0.1 + pow(1 - B * B, -h * 6) * 0.15 - a * b * 0.4 + cos(a + b) / 5 +

pow(cos((o * (a + 1) + (B > 0 ? w : -w)) / 25), 30) * 0.1 * (1 - B * B);

d.g = o / 1000 + 0.7 - o * w * 0.000003;

return true;

}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。