#include
using namespace std;
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() {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),0x0C);
HANDLE o = GetStdHandle(STD_OUTPUT_HANDLE);
_TCHAR buffer[25][80] = { _T(' ') };
_TCHAR ramp[] = _T(".:-=+*#%@");
int count= 0;
int count1=0;
//system("color F4");
for (float t = 0.0f;; t += 0.1f) {
int sy = 0;
float s = sinf(t);
float a = s * s * s * s * 0.2f;
for (float z = 1.3f; z > -1.2f; z -= 0.1f) {
_TCHAR* p = &buffer[sy++][0];
float tz = z * (1.2f - a);
for (float x = -1.5f; x < 1.5f; x += 0.05f) {
float tx = x * (1.2f + a);
float v = f(tx, 0.0f, tz);
if (v <= 0.0f) {
float y0 = h(tx, tz);
float ny = 0.01f;
float nx = h(tx + ny, tz) - y0;
float nz = h(tx, tz + ny) - y0;
float nd = 1.0f / sqrtf(nx * nx + ny * ny + nz * nz);
float d = (nx + ny - nz) * nd * 0.5f + 0.5f;
*p++ = ramp[(int)(d * 5.0f)];
}
else
*p++ = ' ';
}
}
for (sy = 0; sy < 25; sy++) {
COORD coord = { 0, sy };
SetConsoleCursorPosition(o, coord);
WriteConsole(o, buffer[sy], 79, NULL, 0);
}
if(count <= 10){
printf("I Love You ———.Mua~\n") ;
printf("By 川");//
count++;
} else{
printf("You Are My Love.\n");
printf("Hakuya");
count++;
if(count>=20){
count =0;
}
}
Sleep(33);
}
}
using namespace std;
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() {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),0x0C);
HANDLE o = GetStdHandle(STD_OUTPUT_HANDLE);
_TCHAR buffer[25][80] = { _T(' ') };
_TCHAR ramp[] = _T(".:-=+*#%@");
int count= 0;
int count1=0;
//system("color F4");
for (float t = 0.0f;; t += 0.1f) {
int sy = 0;
float s = sinf(t);
float a = s * s * s * s * 0.2f;
for (float z = 1.3f; z > -1.2f; z -= 0.1f) {
_TCHAR* p = &buffer[sy++][0];
float tz = z * (1.2f - a);
for (float x = -1.5f; x < 1.5f; x += 0.05f) {
float tx = x * (1.2f + a);
float v = f(tx, 0.0f, tz);
if (v <= 0.0f) {
float y0 = h(tx, tz);
float ny = 0.01f;
float nx = h(tx + ny, tz) - y0;
float nz = h(tx, tz + ny) - y0;
float nd = 1.0f / sqrtf(nx * nx + ny * ny + nz * nz);
float d = (nx + ny - nz) * nd * 0.5f + 0.5f;
*p++ = ramp[(int)(d * 5.0f)];
}
else
*p++ = ' ';
}
}
for (sy = 0; sy < 25; sy++) {
COORD coord = { 0, sy };
SetConsoleCursorPosition(o, coord);
WriteConsole(o, buffer[sy], 79, NULL, 0);
}
if(count <= 10){
printf("I Love You ———.Mua~\n") ;
printf("By 川");//
count++;
} else{
printf("You Are My Love.\n");
printf("Hakuya");
count++;
if(count>=20){
count =0;
}
}
Sleep(33);
}
}
这几天有网传华裔访问教授在美国洛杉矶街头,用中国功夫击退武装抢劫犯的传闻,现有美国媒体专题报道为证哈,不过他最后还是被抢了,丢失了约3,000美元的物品。
(他击退了抢劫犯,应该第一时间离开现场,而不是逗留,毕竟对方是有家伙在手中的人,结果被枪顶着,只能交出随身行李......。)
[NextShark]Visiting Chinese professor fights off armed robber using martial arts in LA
Martial arts hero: Zhou Pigai, a professor at Xiangtan University in Hunan, China, fought off an armed robbery attempt on Nov. 1, according to state-run news outlet China Daily.
Pigai came to Los Angeles on Oct. 31 to attend an academic visiting program at the University of Southern California.
While looking for lodging in L.A.’s Chinatown, Pigai was allegedly held at gunpoint by a robber wearing a black mask. Using martial arts, he disarmed the robber and fled. But the robber pursued and held him at gunpoint again when Pigai stopped to look at his phone to check for injuries.
Pigai handed over his luggage out of caution, and an investigative report from the LAPD revealed he lost an estimated $3,130 of personal belongings.
Police have already filed a case for investigation. To help with the investigation and public safety education, Zhou re-enacted the incident and recorded it with the help of locals. The footage was later shared online and began trending on social media.
Chinese organizations in the area have since helped provide Pigai with accommodations.
"He is safe and his mood is relatively calm," a university representative from the university said.
(他击退了抢劫犯,应该第一时间离开现场,而不是逗留,毕竟对方是有家伙在手中的人,结果被枪顶着,只能交出随身行李......。)
[NextShark]Visiting Chinese professor fights off armed robber using martial arts in LA
Martial arts hero: Zhou Pigai, a professor at Xiangtan University in Hunan, China, fought off an armed robbery attempt on Nov. 1, according to state-run news outlet China Daily.
Pigai came to Los Angeles on Oct. 31 to attend an academic visiting program at the University of Southern California.
While looking for lodging in L.A.’s Chinatown, Pigai was allegedly held at gunpoint by a robber wearing a black mask. Using martial arts, he disarmed the robber and fled. But the robber pursued and held him at gunpoint again when Pigai stopped to look at his phone to check for injuries.
Pigai handed over his luggage out of caution, and an investigative report from the LAPD revealed he lost an estimated $3,130 of personal belongings.
Police have already filed a case for investigation. To help with the investigation and public safety education, Zhou re-enacted the incident and recorded it with the help of locals. The footage was later shared online and began trending on social media.
Chinese organizations in the area have since helped provide Pigai with accommodations.
"He is safe and his mood is relatively calm," a university representative from the university said.
【The Method for Optimum Design of Water Rocket Flight Stability Performance Conditions Using CAE with T Method and Robust Parameter Design】
#论文# #水火箭# #飞行性能# #力学#
It is important to ensure the accuracy and stability of the flight path of the water rocket. This work develops a simulator with a numerical calculation program based on a mechanical consideration of the flight performance of a water rocket, analyzes the correlation between the flight distance obtained in the simulation and the estimated flight distance by applying a multivariate analysis method and verifies the validity of the flight distance calculated from the result.
DOI: 10.4236/jamp.2021.911172https://t.cn/A6xbX9UG
#论文# #水火箭# #飞行性能# #力学#
It is important to ensure the accuracy and stability of the flight path of the water rocket. This work develops a simulator with a numerical calculation program based on a mechanical consideration of the flight performance of a water rocket, analyzes the correlation between the flight distance obtained in the simulation and the estimated flight distance by applying a multivariate analysis method and verifies the validity of the flight distance calculated from the result.
DOI: 10.4236/jamp.2021.911172https://t.cn/A6xbX9UG
✋热门推荐