Skip to content

Instantly share code, notes, and snippets.

@SergiyOsadchyy
Last active January 16, 2018 18:41
Show Gist options
  • Save SergiyOsadchyy/23255fd3fca09d4ff379fdba9d7d29b3 to your computer and use it in GitHub Desktop.
Save SergiyOsadchyy/23255fd3fca09d4ff379fdba9d7d29b3 to your computer and use it in GitHub Desktop.
Geometric Modelling Lab_1
// Lab_1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
#include <glut.h>
#include <stdio.h>
#include <iostream>
//#include <math.h>
#define PI 3.14159265
std::string myXaxis = "X";
std::string myYaxis = "Y";
std::string my50value = "50";
std::string my100value = "100";
std::string myMenu1line = "Q-Exit A-Left D-Right W-Up S-Down Z-RotateLeft X-RotateRight N-Animation";
float horizontalMove = 0.0;
float verticalMove = 0.0;
float deltaMove = 3.0;
float rotateDegree = 2.0;
float rotateDegreeRadian = 0.0;
float mytempX = 0.0;
float mytempY = 0.0;
float mytempVectorX = 0.0;
float mytempVectorY = 0.0;
float precision = 0.005;
float point1x = 40.0;
float point1y = 180.0;
float vector1x = 40.0;
float vector1y = 40.0;
float point2x = 80.0;
float point2y = 160.0;
float vector2x = -40.0;
float vector2y = -50.0;
float vector2_3x = 10.0;
float vector2_3y = 10.0;
float point3x = 96.0;
float point3y = 155.0;
float vector3x = 0.0;
float vector3y = -10.0;
float point4x = 115.0;
float point4y = 150.0;
float vector4x = -15.0;
float vector4y = -20.0;
float point5x = 82.0;
float point5y = 203.0;
float vector5x = 40.0;
float vector5y = 0.0;
float point6x = 190.0;
float point6y = 190.0;
float vector6x = 45.0;
float vector6y = 35.0;
float point7x = 105.0;
float point7y = 200.0;
float vector7x = 0.0;
float vector7y = 0.0;
float point8x = 119.0;
float point8y = 209.0;
float vector8x = -5.0;
float vector8y = 5.0;
float point9x = 167.0;
float point9y = 190.0;
float vector9x = -5.0;
float vector9y = 0.0;
float point10x = 165.0;
float point10y = 198.0;
float vector10x = -50.0;
float vector10y = -10.0;
float vector10_9x = 10.0;
float vector10_9y = -10.0;
float vector10_13x = 100.0;
float vector10_13y = -10.0;
float point11x = 37.0;
float point11y = 257.0;
float vector11x = -35.0;
float vector11y = -95.0;
float point12x = 120.0;
float point12y = 210.0;
float vector12x = 20.0;
float vector12y = -25.0;
float vector12_10x = -10.0;
float vector12_10y = 3.0;
float point13x = 200.0;
float point13y = 205.0;
float vector13x = 3.0;
float vector13y = 10.0;
float vector13_14x = 10.0;
float vector13_14y = 20.0;
float point14x = 180.0;
float point14y = 218.0;
float vector14x = -15.0;
float vector14y = 20.0;
float point15x = 120.0;
float point15y = 232.0;
float vector15x = -70.0;
float vector15y = -30.0;
float vector15_16x = 10.0;
float vector15_16y = 10.0;
float point16x = 47.0;
float point16y = 243.0;
float vector16x = 0.0;
float vector16y = 0.0;
float vector16_17x = 20.0;
float vector16_17y = -10.0;
float point17x = 40.0;
float point17y = 257.0;
float vector17x = 15.0;
float vector17y = -15.0;
float point18x = 178.0;
float point18y = 213.0;
float vector18x = 0.0;
float vector18y = 0.0;
float point19x = 163.0;
float point19y = 214.0;
float vector19x = 0.0;
float vector19y = 0.0;
float point20x = 163.0;
float point20y = 227.0;
float vector20x = 10.0;
float vector20y = -10.0;
float point21x = 170.0;
float point21y = 225.0;
float vector21x = 0.0;
float vector21y = 0.0;
float point22x = 159.0;
float point22y = 216.0;
float vector22x = 10.0;
float vector22y = 10.0;
float point23x = 161.0;
float point23y = 227.0;
float vector23x = -5.0;
float vector23y = 10.0;
float point24x = 158.0;
float point24y = 216.0;
float vector24x = -10.0;
float vector24y = -5.0;
float point25x = 143.0;
float point25y = 218.0;
float vector25x = -5.0;
float vector25y = 3.0;
float point26x = 142.0;
float point26y = 218.0;
float vector26x = 10.0;
float vector26y = 45.0;
float point27x = 159.0;
float point27y = 229.0;
float vector27x = 15.0;
float vector27y = 3.0;
float point28x = 161.0;
float point28y = 212.0;
float vector28x = -100.0;
float vector28y = -50.0;
float point29x = 144.0;
float point29y = 231.0;
float vector29x = 30.0;
float vector29y = 20.0;
float point30x = 168.0;
float point30y = 258.0;
float vector30x = -30.0;
float vector30y = -5.0;
float point31x = 140.0;
float point31y = 264.0;
float vector31x = 30.0;
float vector31y = 20.0;
float vector31_32x = -20.0;
float vector31_32y = -10.0;
float point32x = 192.0;
float point32y = 253.0;
float vector32x = -30.0;
float vector32y = -50.0;
float vector32_31x = 10.0;
float vector32_31y = 30.0;
float point33x = 104.0;
float point33y = 269.0;
float vector33x = 10.0;
float vector33y = 50.0;
float vector33_34x = -20.0;
float vector33_34y = -40.0;
float point34x = 218.0;
float point34y = 248.0;
float vector34x = -30.0;
float vector34y = -80.0;
float vector34_33x = 10.0;
float vector34_33y = 60.0;
float point35x = 74.0;
float point35y = 276.0;
float vector35x = 10.0;
float vector35y = 50.0;
float vector35_36x = 10.0;
float vector35_36y = -20.0;
float point36x = 128.0;
float point36y = 279.0;
float vector36x = -10.0;
float vector36y = 3.0;
float animationPoint1x = 28.0;
float animationPoint1y = 193.0;
float animationVector1x = -10.0;
float animationVector1y = 10.0;
float animationPoint2x = 34.0;
float animationPoint2y = 210.0;
float animationVector2x = 10.0;
float animationVector2y = 10.0;
float animationVector2_3x = 10.0;
float animationVector2_3y = 10.0;
float animationPoint3x = 90.0;
float animationPoint3y = 220.0;
float animationVector3x = 10.0;
float animationVector3y = 10.0;
float animationPoint4x = 100.0;
float animationPoint4y = 230.0;
float animationVector4x = 15.0;
float animationVector4y = 5.0;
float animationPoint5x = 100.0;
float animationPoint5y = 230.0;
float animationVector5x = 10.0;
float animationVector5y = 10.0;
float animationPoint6x = 105.0;
float animationPoint6y = 218.0;
float animationVector6x = -10.0;
float animationVector6y = -10.0;
float animationPoint7x = 105.0;
float animationPoint7y = 218.0;
float animationVector7x = 10.0;
float animationVector7y = 10.0;
float animationPoint8x = 115.0;
float animationPoint8y = 218.0;
float animationVector8x = 10.0;
float animationVector8y = 0.0;
float animationPoint9x = 115.0;
float animationPoint9y = 218.0;
float animationVector9x = 10.0;
float animationVector9y = 10.0;
float animationPoint10x = 160.0;
float animationPoint10y = 285.0;
float animationVector10x = 40.0;
float animationVector10y = 5.0;
float animationVector10_9x = 50.0;
float animationVector10_9y = -10.0;
float animationVector10_13x = 40.0;
float animationVector10_13y = 5.0;
float animationPoint11x = 160.0;
float animationPoint11y = 285.0;
float animationVector11x = 40.0;
float animationVector11y = 5.0;
float animationPoint12x = 187.0;
float animationPoint12y = 272.0;
float animationVector12x = 10.0;
float animationVector12y = -10.0;
float animationVector12_10x = 10.0;
float animationVector12_10y = -10.0;
float animationPoint13x = 187.0;
float animationPoint13y = 272.0;
float animationVector13x = 10.0;
float animationVector13y = -10.0;
float animationVector13_14x = 10.0;
float animationVector13_14y = -10.0;
float animationPoint14x = 158.0;
float animationPoint14y = 202.0;
float animationVector14x = -10.0;
float animationVector14y = -10.0;
float animationPoint15x = 170.0;
float animationPoint15y = 190.0;
float animationVector15x = 10.0;
float animationVector15y = -10.0;
float animationVector15_16x = -10.0;
float animationVector15_16y = -10.0;
float animationPoint16x = 180.0;
float animationPoint16y = 190.0;
float animationVector16x = -20.0;
float animationVector16y = 10.0;
float animationVector16_17x = -10.0;
float animationVector16_17y = 10.0;
float animationPoint17x = 181.0;
float animationPoint17y = 177.0;
float animationVector17x = 0.0;
float animationVector17y = 10.0;
float animationPoint18x = 181.0;
float animationPoint18y = 177.0;
float animationVector18x = -10.0;
float animationVector18y = 10.0;
float animationPoint19x = 194.0;
float animationPoint19y = 160.0;
float animationVector19x = -10.0;
float animationVector19y = 10.0;
float animationPoint20x = 190.0;
float animationPoint20y = 148.0;
float animationVector20x = -10.0;
float animationVector20y = -10.0;
float animationPoint21x = 140.0;
float animationPoint21y = 170.0;
float animationVector21x = -20.0;
float animationVector21y = -10.0;
float animationPoint22x = 140.0;
float animationPoint22y = 170.0;
float animationVector22x = -10.0;
float animationVector22y = -10.0;
float animationPoint23x = 128.0;
float animationPoint23y = 155.0;
float animationVector23x = -10.0;
float animationVector23y = 0.0;
float animationPoint24x = 128.0;
float animationPoint24y = 155.0;
float animationVector24x = -10.0;
float animationVector24y = 0.0;
float animationPoint25x = 120.0;
float animationPoint25y = 158.0;
float animationVector25x = -10.0;
float animationVector25y = 0.0;
float animationPoint26x = 120.0;
float animationPoint26y = 158.0;
float animationVector26x = 10.0;
float animationVector26y = 10.0;
float animationPoint27x = 108.0;
float animationPoint27y = 144.0;
float animationVector27x = -10.0;
float animationVector27y = 10.0;
float animationPoint28x = 108.0;
float animationPoint28y = 144.0;
float animationVector28x = 0.0;
float animationVector28y = 0.0;
float animationPoint29x = 84.0;
float animationPoint29y = 145.0;
float animationVector29x = -30.0;
float animationVector29y = 0.0;
float animationPoint30x = 84.0;
float animationPoint30y = 145.0;
float animationVector30x = 0.0;
float animationVector30y = 30.0;
float animationPoint31x = 58.0;
float animationPoint31y = 160.0;
float animationVector31x = -10.0;
float animationVector31y = 0.0;
float animationVector31_32x = 0.0;
float animationVector31_32y = -40.0;
float animationPoint32x = 77.0;
float animationPoint32y = 170.0;
float animationVector32x = 0.0;
float animationVector32y = 0.0;
float animationVector32_31x = 20.0;
float animationVector32_31y = 0.0;
float animationPoint33x = 77.0;
float animationPoint33y = 170.0;
float animationVector33x = 0.0;
float animationVector33y = 0.0;
float animationVector33_34x = 10.0;
float animationVector33_34y = -10.0;
float animationPoint34x = 68.0;
float animationPoint34y = 193.0;
float animationVector34x = 20.0;
float animationVector34y = -5.0;
float animationVector34_33x = -10.0;
float animationVector34_33y = 10.0;
float animationPoint35x = 32.0;
float animationPoint35y = 195.0;
float animationVector35x = -40.0;
float animationVector35y = -20.0;
float animationVector35_36x = 10.0;
float animationVector35_36y = 10.0;
float animationPoint36x = 28.0;
float animationPoint36y = 193.0;
float animationVector36x = -10.0;
float animationVector36y = -10.0;
void init();
void axis();
void myFergusonCurve(float point1x, float point1y, float vector1x, float vector1y, float point2x, float point2y, float vector2x, float vector2y, float precision);
void myDrawText(const char *text, int length, int x, int y);
void keyboard(unsigned char key, int x, int y);
void myHorizontalMove();
void myVerticalMove();
void myRotation();
void myAnimation(int t);
int main(int argc, char * argv[])
{
glutInit(&argc, argv); // Initialize GLUT
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); // Set display mode
glutInitWindowPosition(50, 100); // Set top-left display-window position
glutInitWindowSize(800, 600); // Set display-window width and height
glutCreateWindow("Lab 1"); // Create display window
init(); // Execute initialization procedure
glutDisplayFunc(axis); // Send graphics to display window
glutKeyboardFunc(keyboard);
glutMainLoop(); // Display everything and wait
return 0;
}
void init()
{
glClearColor(1.0, 1.0, 1.0, 0.0); // Set display window color to white
glMatrixMode(GL_PROJECTION); // Set projection parameters
gluOrtho2D(0.0, 400.0, 0.0, 300.0);
}
void axis()
{
glClear(GL_COLOR_BUFFER_BIT); // Clear display window
glColor3f(0.0, 0.0, 0.0); // Set linegegment color to black
glBegin(GL_LINES);
//glVertex2i(200, 30); // Specify y-axis
//glVertex2i(200, 290);
//glVertex2f(198.0, 285.0);
//glVertex2f(200.0, 290.0);
//glVertex2f(202.0, 285.0);
//glVertex2f(200.0, 290.0);
glVertex2i(10, 50); // Specify x-axis
glVertex2i(390, 50);
glVertex2f(385.0, 52.0);
glVertex2f(390.0, 50.0);
glVertex2f(385.0, 48.0);
glVertex2f(390.0, 50.0);
//glVertex2i(250, 148); // Specify 50 point on x-axis
//glVertex2i(250, 152);
//glVertex2i(300, 148); // Specify 100 point on x-axis
//glVertex2i(300, 152);
//glVertex2i(198, 200); // Specify 50 point on y-axis
//glVertex2i(202, 200);
//glVertex2i(198, 250); // Specify 100 point on y-axis
//glVertex2i(202, 250);
//
//glVertex2f(animationPoint34x, animationPoint34y);
//glVertex2f(animationPoint34x + animationVector34x, animationPoint34y + animationVector34y);
//glVertex2f(animationPoint4x, animationPoint4y);
//glVertex2f(animationPoint4x + animationVector4x, animationPoint4y + animationVector4y);
//
glEnd();
// x-axis text
myDrawText(myXaxis.data(), myXaxis.size(), 390, 40);
// y-axis text
//myDrawText(myYaxis.data(), myYaxis.size(), 190, 290);
// 50 point text
//myDrawText(my50value.data(), my50value.size(), 245, 140);
//myDrawText(my50value.data(), my50value.size(), 187, 198);
// 100 point text
//myDrawText(my100value.data(), my100value.size(), 292, 140);
//myDrawText(my100value.data(), my100value.size(), 182, 248);
// menu
myDrawText(myMenu1line.data(), myMenu1line.size(), 10, 20);
myFergusonCurve(point1x, point1y, vector1x, vector1y, point2x, point2y, vector2x, vector2y, precision);
myFergusonCurve(point2x, point2y, vector2_3x, vector2_3y, point3x, point3y, vector3x, vector3y, precision);
myFergusonCurve(point3x, point3y, vector2_3x, vector2_3y, point4x, point4y, vector4x, vector4y, precision);
myFergusonCurve(point5x, point5y, vector5x, vector5y, point6x, point6y, vector6x, vector6y, precision);
myFergusonCurve(point7x, point7y, vector7x, vector7y, point8x, point8y, vector8x, vector8y, precision);
myFergusonCurve(point9x, point9y, vector9x, vector9y, point10x, point10y, vector10_9x, vector10_9y, precision);
myFergusonCurve(point11x, point11y, vector11x, vector11y, point12x, point12y, vector12x, vector12y, precision);
myFergusonCurve(point10x, point10y, vector10x, vector10y, point12x, point12y, vector12_10x, vector12_10y, precision);
myFergusonCurve(point10x, point10y, vector10_13x, vector10_13y, point13x, point13y, vector13x, vector13y, precision);
myFergusonCurve(point13x, point13y, vector13_14x, vector13_14y, point14x, point14y, vector14x, vector14y, precision);
myFergusonCurve(point14x, point14y, vector14x, vector14y, point15x, point15y, vector15x, vector15y, precision);
myFergusonCurve(point16x, point16y, vector16x, vector16y, point15x, point15y, vector15_16x, vector15_16y, precision);
myFergusonCurve(point17x, point17y, vector17x, vector17y, point16x, point16y, vector16_17x, vector16_17y, precision);
myFergusonCurve(point18x, point18y, vector18x, vector18y, point19x, point19y, vector19x, vector19y, precision);
myFergusonCurve(point20x, point20y, vector20x, vector20y, point19x, point19y, vector19x, vector19y, precision);
myFergusonCurve(point20x, point20y, vector20x, vector20y, point21x, point21y, vector21x, vector21y, precision);
myFergusonCurve(point22x, point22y, vector22x, vector22y, point23x, point23y, vector23x, vector23y, precision);
myFergusonCurve(point24x, point24y, vector24x, vector24y, point25x, point25y, vector25x, vector25y, precision);
myFergusonCurve(point26x, point26y, vector26x, vector26y, point27x, point27y, vector27x, vector27y, precision);
myFergusonCurve(point28x, point28y, vector28x, vector28y, point29x, point29y, vector29x, vector29y, precision);
myFergusonCurve(point30x, point30y, vector30x, vector30y, point31x, point31y, vector31x, vector31y, precision);
myFergusonCurve(point32x, point32y, vector32_31x, vector32_31y, point31x, point31y, vector31_32x, vector31_32y, precision);
myFergusonCurve(point32x, point32y, vector32x, vector32y, point33x, point33y, vector33x, vector33y, precision);
myFergusonCurve(point34x, point34y, vector34_33x, vector34_33y, point33x, point33y, vector33_34x, vector33_34y, precision);
myFergusonCurve(point34x, point34y, vector34x, vector34y, point35x, point35y, vector35x, vector35y, precision);
myFergusonCurve(point36x, point36y, vector36x, vector36y, point35x, point35y, vector35_36x, vector35_36y, precision);
//myFergusonCurve(animationPoint1x, animationPoint1y, animationVector1x, animationVector1y, animationPoint2x, animationPoint2y, animationVector2x, animationVector2y, precision);
//myFergusonCurve(animationPoint2x, animationPoint2y, animationVector2_3x, animationVector2_3y, animationPoint3x, animationPoint3y, animationVector3x, animationVector3y, precision);
//myFergusonCurve(animationPoint3x, animationPoint3y, animationVector2_3x, animationVector2_3y, animationPoint4x, animationPoint4y, animationVector4x, animationVector4y, precision);
//myFergusonCurve(animationPoint5x, animationPoint5y, animationVector5x, animationVector5y, animationPoint6x, animationPoint6y, animationVector6x, animationVector6y, precision);
//myFergusonCurve(animationPoint7x, animationPoint7y, animationVector7x, animationVector7y, animationPoint8x, animationPoint8y, animationVector8x, animationVector8y, precision);
//myFergusonCurve(animationPoint9x, animationPoint9y, animationVector9x, animationVector9y, animationPoint10x, animationPoint10y, animationVector10_9x, animationVector10_9y, precision);
//myFergusonCurve(animationPoint11x, animationPoint11y, animationVector11x, animationVector11y, animationPoint12x, animationPoint12y, animationVector12x, animationVector12y, precision);
//myFergusonCurve(animationPoint10x, animationPoint10y, animationVector10x, animationVector10y, animationPoint12x, animationPoint12y, animationVector12_10x, animationVector12_10y, precision);
//myFergusonCurve(animationPoint10x, animationPoint10y, animationVector10_13x, animationVector10_13y, animationPoint13x, animationPoint13y, animationVector13x, animationVector13y, precision);
//myFergusonCurve(animationPoint13x, animationPoint13y, animationVector13_14x, animationVector13_14y, animationPoint14x, animationPoint14y, animationVector14x, animationVector14y, precision);
//myFergusonCurve(animationPoint14x, animationPoint14y, animationVector14x, animationVector14y, animationPoint15x, animationPoint15y, animationVector15x, animationVector15y, precision);
//myFergusonCurve(animationPoint16x, animationPoint16y, animationVector16x, animationVector16y, animationPoint15x, animationPoint15y, animationVector15_16x, animationVector15_16y, precision);
//myFergusonCurve(animationPoint17x, animationPoint17y, animationVector17x, animationVector17y, animationPoint16x, animationPoint16y, animationVector16_17x, animationVector16_17y, precision);
//myFergusonCurve(animationPoint18x, animationPoint18y, animationVector18x, animationVector18y, animationPoint19x, animationPoint19y, animationVector19x, animationVector19y, precision);
//myFergusonCurve(animationPoint20x, animationPoint20y, animationVector20x, animationVector20y, animationPoint19x, animationPoint19y, animationVector19x, animationVector19y, precision);
//myFergusonCurve(animationPoint20x, animationPoint20y, animationVector20x, animationVector20y, animationPoint21x, animationPoint21y, animationVector21x, animationVector21y, precision);
//myFergusonCurve(animationPoint22x, animationPoint22y, animationVector22x, animationVector22y, animationPoint23x, animationPoint23y, animationVector23x, animationVector23y, precision);
//myFergusonCurve(animationPoint24x, animationPoint24y, animationVector24x, animationVector24y, animationPoint25x, animationPoint25y, animationVector25x, animationVector25y, precision);
//myFergusonCurve(animationPoint26x, animationPoint26y, animationVector26x, animationVector26y, animationPoint27x, animationPoint27y, animationVector27x, animationVector27y, precision);
//myFergusonCurve(animationPoint28x, animationPoint28y, animationVector28x, animationVector28y, animationPoint29x, animationPoint29y, animationVector29x, animationVector29y, precision);
//myFergusonCurve(animationPoint30x, animationPoint30y, animationVector30x, animationVector30y, animationPoint31x, animationPoint31y, animationVector31x, animationVector31y, precision);
//myFergusonCurve(animationPoint32x, animationPoint32y, animationVector32_31x, animationVector32_31y, animationPoint31x, animationPoint31y, animationVector31_32x, animationVector31_32y, precision);
//myFergusonCurve(animationPoint32x, animationPoint32y, animationVector32x, animationVector32y, animationPoint33x, animationPoint33y, animationVector33x, animationVector33y, precision);
//myFergusonCurve(animationPoint34x, animationPoint34y, animationVector34_33x, animationVector34_33y, animationPoint33x, animationPoint33y, animationVector33_34x, animationVector33_34y, precision);
//myFergusonCurve(animationPoint34x, animationPoint34y, animationVector34x, animationVector34y, animationPoint35x, animationPoint35y, animationVector35x, animationVector35y, precision);
//myFergusonCurve(animationPoint36x, animationPoint36y, animationVector36x, animationVector36y, animationPoint35x, animationPoint35y, animationVector35_36x, animationVector35_36y, precision);
glFlush(); // Process all OpenGL routines as quickly as possible
glutSwapBuffers();
}
void myFergusonCurve(float point1x, float point1y, float vector1x, float vector1y, float point2x, float point2y, float vector2x, float vector2y, float precision)
{
int hermitianMatrix11 = 1;
int hermitianMatrix12 = 0;
int hermitianMatrix13 = 0;
int hermitianMatrix14 = 0;
int hermitianMatrix21 = 0;
int hermitianMatrix22 = 0;
int hermitianMatrix23 = 1;
int hermitianMatrix24 = 0;
int hermitianMatrix31 = -3;
int hermitianMatrix32 = 3;
int hermitianMatrix33 = -2;
int hermitianMatrix34 = -1;
int hermitianMatrix41 = 2;
int hermitianMatrix42 = -2;
int hermitianMatrix43 = 1;
int hermitianMatrix44 = 1;
float paramA10 = hermitianMatrix11 * point1x + hermitianMatrix12 * point2x + hermitianMatrix13 * vector1x + hermitianMatrix14 * vector2x;
float paramA11 = hermitianMatrix21 * point1x + hermitianMatrix22 * point2x + hermitianMatrix23 * vector1x + hermitianMatrix24 * vector2x;
float paramA12 = hermitianMatrix31 * point1x + hermitianMatrix32 * point2x + hermitianMatrix33 * vector1x + hermitianMatrix34 * vector2x;
float paramA13 = hermitianMatrix41 * point1x + hermitianMatrix42 * point2x + hermitianMatrix43 * vector1x + hermitianMatrix44 * vector2x;
float paramA20 = hermitianMatrix11 * point1y + hermitianMatrix12 * point2y + hermitianMatrix13 * vector1y + hermitianMatrix14 * vector2y;
float paramA21 = hermitianMatrix21 * point1y + hermitianMatrix22 * point2y + hermitianMatrix23 * vector1y + hermitianMatrix24 * vector2y;
float paramA22 = hermitianMatrix31 * point1y + hermitianMatrix32 * point2y + hermitianMatrix33 * vector1y + hermitianMatrix34 * vector2y;
float paramA23 = hermitianMatrix41 * point1y + hermitianMatrix42 * point2y + hermitianMatrix43 * vector1y + hermitianMatrix44 * vector2y;
float originPointX = 0.0;
float originPointY = 0.0;
float destinationPointX = point1x;
float destinationPointY = point1y;
float temp = precision;
glBegin(GL_LINES);
for (float i = precision; i < 1; i = i + precision)
{
originPointX = destinationPointX;
originPointY = destinationPointY;
destinationPointX = paramA10 + paramA11 * temp + paramA12 * temp*temp + paramA13 * temp*temp*temp;
destinationPointY = paramA20 + paramA21 * temp + paramA22 * temp*temp + paramA23 * temp*temp*temp;
glVertex2f(originPointX, originPointY);
glVertex2f(destinationPointX, destinationPointY);
temp = i + precision;
}
glEnd();
glFlush(); // Process all OpenGL routines as quickly as possible
}
void myDrawText(const char *text, int length, int x, int y)
{
glMatrixMode(GL_PROJECTION);
double *matrix = new double[16];
glGetDoublev(GL_PROJECTION_MATRIX, matrix);
glLoadIdentity();
gluOrtho2D(0.0, 400.0, 0.0, 300.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glPushMatrix();
glLoadIdentity();
glRasterPos2f(x, y);
for (int i = 0; i < length; i++)
{
glutBitmapCharacter(GLUT_BITMAP_9_BY_15, (int)text[i]);
}
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glLoadMatrixd(matrix);
glMatrixMode(GL_MODELVIEW);
}
void keyboard(unsigned char key, int x, int y)
{
switch (key)
{
case 'a' | 'A':
horizontalMove = -1 * deltaMove;
myHorizontalMove();
glutPostRedisplay();
break;
case 'd' | 'D':
horizontalMove = deltaMove;
myHorizontalMove();
glutPostRedisplay();
break;
case 'w' | 'W':
verticalMove = deltaMove;
myVerticalMove();
glutPostRedisplay();
break;
case 's' | 'S':
verticalMove = -1 * deltaMove;
myVerticalMove();
glutPostRedisplay();
break;
case 'z' | 'Z':
rotateDegreeRadian = rotateDegree * PI / 180;
myRotation();
glutPostRedisplay();
break;
case 'x' | 'X':
rotateDegreeRadian = -rotateDegree * PI / 180;
myRotation();
glutPostRedisplay();
break;
case 'n' | 'N':
glutTimerFunc(100, myAnimation, 0);
//myAnimation(0);
glutPostRedisplay();
break;
case 'q' | 'Q':
exit(0);
break;
}
}
void myHorizontalMove()
{
point1x += horizontalMove;
point2x += horizontalMove;
point3x += horizontalMove;
point4x += horizontalMove;
point5x += horizontalMove;
point6x += horizontalMove;
point7x += horizontalMove;
point8x += horizontalMove;
point9x += horizontalMove;
point10x += horizontalMove;
point11x += horizontalMove;
point12x += horizontalMove;
point13x += horizontalMove;
point14x += horizontalMove;
point15x += horizontalMove;
point16x += horizontalMove;
point17x += horizontalMove;
point18x += horizontalMove;
point19x += horizontalMove;
point20x += horizontalMove;
point21x += horizontalMove;
point22x += horizontalMove;
point23x += horizontalMove;
point24x += horizontalMove;
point25x += horizontalMove;
point26x += horizontalMove;
point27x += horizontalMove;
point28x += horizontalMove;
point29x += horizontalMove;
point30x += horizontalMove;
point31x += horizontalMove;
point32x += horizontalMove;
point33x += horizontalMove;
point34x += horizontalMove;
point35x += horizontalMove;
point36x += horizontalMove;
}
void myVerticalMove()
{
point1y += verticalMove;
point2y += verticalMove;
point3y += verticalMove;
point4y += verticalMove;
point5y += verticalMove;
point6y += verticalMove;
point7y += verticalMove;
point8y += verticalMove;
point9y += verticalMove;
point10y += verticalMove;
point11y += verticalMove;
point12y += verticalMove;
point13y += verticalMove;
point14y += verticalMove;
point15y += verticalMove;
point16y += verticalMove;
point17y += verticalMove;
point18y += verticalMove;
point19y += verticalMove;
point20y += verticalMove;
point21y += verticalMove;
point22y += verticalMove;
point23y += verticalMove;
point24y += verticalMove;
point25y += verticalMove;
point26y += verticalMove;
point27y += verticalMove;
point28y += verticalMove;
point29y += verticalMove;
point30y += verticalMove;
point31y += verticalMove;
point32y += verticalMove;
point33y += verticalMove;
point34y += verticalMove;
point35y += verticalMove;
point36y += verticalMove;
}
void myRotation()
{
mytempX = point1x;
mytempY = point1y;
//point1x = 40.0;
//point1y = 180.0;
mytempVectorX = vector1x + mytempX;
mytempVectorY = vector1y + mytempY;
vector1x = -1 * point1x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector1y = -1 * point1y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point2x;
mytempY = point2y;
point2x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point2y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector2x + mytempX;
mytempVectorY = vector2y + mytempY;
vector2x = -1 * point2x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector2y = -1 * point2y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector2_3x + mytempX;
mytempVectorY = vector2_3y + mytempY;
vector2_3x = -1 * point2x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector2_3y = -1 * point2y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point3x;
mytempY = point3y;
point3x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point3y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector3x + mytempX;
mytempVectorY = vector3y + mytempY;
vector3x = -1 * point3x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector3y = -1 * point3y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point4x;
mytempY = point4y;
point4x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point4y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector4x + mytempX;
mytempVectorY = vector4y + mytempY;
vector4x = -1 * point4x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector4y = -1 * point4y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point5x;
mytempY = point5y;
point5x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point5y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector5x + mytempX;
mytempVectorY = vector5y + mytempY;
vector5x = -1 * point5x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector5y = -1 * point5y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point6x;
mytempY = point6y;
point6x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point6y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector6x + mytempX;
mytempVectorY = vector6y + mytempY;
vector6x = -1 * point6x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector6y = -1 * point6y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point7x;
mytempY = point7y;
point7x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point7y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector7x + mytempX;
mytempVectorY = vector7y + mytempY;
vector7x = -1 * point7x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector7y = -1 * point7y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point8x;
mytempY = point8y;
point8x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point8y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector8x + mytempX;
mytempVectorY = vector8y + mytempY;
vector8x = -1 * point8x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector8y = -1 * point8y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point9x;
mytempY = point9y;
point9x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point9y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector9x + mytempX;
mytempVectorY = vector9y + mytempY;
vector9x = -1 * point9x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector9y = -1 * point9y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point10x;
mytempY = point10y;
point10x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point10y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector10x + mytempX;
mytempVectorY = vector10y + mytempY;
vector10x = -1 * point10x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector10y = -1 * point10y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector10_9x + mytempX;
mytempVectorY = vector10_9y + mytempY;
vector10_9x = -1 * point10x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector10_9y = -1 * point10y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector10_13x + mytempX;
mytempVectorY = vector10_13y + mytempY;
vector10_13x = -1 * point10x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector10_13y = -1 * point10y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point11x;
mytempY = point11y;
point11x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point11y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector11x + mytempX;
mytempVectorY = vector11y + mytempY;
vector11x = -1 * point11x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector11y = -1 * point11y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point12x;
mytempY = point12y;
point12x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point12y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector12x + mytempX;
mytempVectorY = vector12y + mytempY;
vector12x = -1 * point12x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector12y = -1 * point12y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector12_10x + mytempX;
mytempVectorY = vector12_10y + mytempY;
vector12_10x = -1 * point12x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector12_10y = -1 * point12y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point13x;
mytempY = point13y;
point13x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point13y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector13x + mytempX;
mytempVectorY = vector13y + mytempY;
vector13x = -1 * point13x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector13y = -1 * point13y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector13_14x + mytempX;
mytempVectorY = vector13_14y + mytempY;
vector13_14x = -1 * point13x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector13_14y = -1 * point13y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point14x;
mytempY = point14y;
point14x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point14y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector14x + mytempX;
mytempVectorY = vector14y + mytempY;
vector14x = -1 * point14x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector14y = -1 * point14y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point15x;
mytempY = point15y;
point15x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point15y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector15x + mytempX;
mytempVectorY = vector15y + mytempY;
vector15x = -1 * point15x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector15y = -1 * point15y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector15_16x + mytempX;
mytempVectorY = vector15_16y + mytempY;
vector15_16x = -1 * point15x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector15_16y = -1 * point15y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point16x;
mytempY = point16y;
point16x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point16y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector16x + mytempX;
mytempVectorY = vector16y + mytempY;
vector16x = -1 * point16x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector16y = -1 * point16y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector16_17x + mytempX;
mytempVectorY = vector16_17y + mytempY;
vector16_17x = -1 * point16x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector16_17y = -1 * point16y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point17x;
mytempY = point17y;
point17x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point17y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector17x + mytempX;
mytempVectorY = vector17y + mytempY;
vector17x = -1 * point17x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector17y = -1 * point17y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point18x;
mytempY = point18y;
point18x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point18y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector18x + mytempX;
mytempVectorY = vector18y + mytempY;
vector18x = -1 * point18x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector18y = -1 * point18y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point19x;
mytempY = point19y;
point19x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point19y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector19x + mytempX;
mytempVectorY = vector19y + mytempY;
vector19x = -1 * point19x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector19y = -1 * point19y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point20x;
mytempY = point20y;
point20x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point20y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector20x + mytempX;
mytempVectorY = vector20y + mytempY;
vector20x = -1 * point20x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector20y = -1 * point20y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point21x;
mytempY = point21y;
point21x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point21y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector21x + mytempX;
mytempVectorY = vector21y + mytempY;
vector21x = -1 * point21x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector21y = -1 * point21y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point22x;
mytempY = point22y;
point22x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point22y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector22x + mytempX;
mytempVectorY = vector22y + mytempY;
vector22x = -1 * point22x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector22y = -1 * point22y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point23x;
mytempY = point23y;
point23x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point23y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector23x + mytempX;
mytempVectorY = vector23y + mytempY;
vector23x = -1 * point23x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector23y = -1 * point23y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point24x;
mytempY = point24y;
point24x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point24y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector24x + mytempX;
mytempVectorY = vector24y + mytempY;
vector24x = -1 * point24x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector24y = -1 * point24y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point25x;
mytempY = point25y;
point25x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point25y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector25x + mytempX;
mytempVectorY = vector25y + mytempY;
vector25x = -1 * point25x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector25y = -1 * point25y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point26x;
mytempY = point26y;
point26x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point26y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector26x + mytempX;
mytempVectorY = vector26y + mytempY;
vector26x = -1 * point26x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector26y = -1 * point26y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point27x;
mytempY = point27y;
point27x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point27y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector27x + mytempX;
mytempVectorY = vector27y + mytempY;
vector27x = -1 * point27x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector27y = -1 * point27y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point28x;
mytempY = point28y;
point28x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point28y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector28x + mytempX;
mytempVectorY = vector28y + mytempY;
vector28x = -1 * point28x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector28y = -1 * point28y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point29x;
mytempY = point29y;
point29x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point29y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector29x + mytempX;
mytempVectorY = vector29y + mytempY;
vector29x = -1 * point29x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector29y = -1 * point29y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point30x;
mytempY = point30y;
point30x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point30y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector30x + mytempX;
mytempVectorY = vector30y + mytempY;
vector30x = -1 * point30x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector30y = -1 * point30y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point31x;
mytempY = point31y;
point31x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point31y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector31x + mytempX;
mytempVectorY = vector31y + mytempY;
vector31x = -1 * point31x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector31y = -1 * point31y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector31_32x + mytempX;
mytempVectorY = vector31_32y + mytempY;
vector31_32x = -1 * point31x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector31_32y = -1 * point31y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point32x;
mytempY = point32y;
point32x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point32y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector32x + mytempX;
mytempVectorY = vector32y + mytempY;
vector32x = -1 * point32x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector32y = -1 * point32y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector32_31x + mytempX;
mytempVectorY = vector32_31y + mytempY;
vector32_31x = -1 * point32x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector32_31y = -1 * point32y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point33x;
mytempY = point33y;
point33x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point33y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector33x + mytempX;
mytempVectorY = vector33y + mytempY;
vector33x = -1 * point33x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector33y = -1 * point33y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector33_34x + mytempX;
mytempVectorY = vector33_34y + mytempY;
vector33_34x = -1 * point33x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector33_34y = -1 * point33y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point34x;
mytempY = point34y;
point34x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point34y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector34x + mytempX;
mytempVectorY = vector34y + mytempY;
vector34x = -1 * point34x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector34y = -1 * point34y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector34_33x + mytempX;
mytempVectorY = vector34_33y + mytempY;
vector34_33x = -1 * point34x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector34_33y = -1 * point34y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point35x;
mytempY = point35y;
point35x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point35y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector35x + mytempX;
mytempVectorY = vector35y + mytempY;
vector35x = -1 * point35x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector35y = -1 * point35y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector35_36x + mytempX;
mytempVectorY = vector35_36y + mytempY;
vector35_36x = -1 * point35x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector35_36y = -1 * point35y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempX = point36x;
mytempY = point36y;
point36x = mytempX * cos(rotateDegreeRadian) - mytempY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
point36y = mytempX * sin(rotateDegreeRadian) + mytempY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
mytempVectorX = vector36x + mytempX;
mytempVectorY = vector36y + mytempY;
vector36x = -1 * point36x + mytempVectorX * cos(rotateDegreeRadian) - mytempVectorY * sin(rotateDegreeRadian) - point1x * (cos(rotateDegreeRadian) - 1) + point1y * sin(rotateDegreeRadian);
vector36y = -1 * point36y + mytempVectorX * sin(rotateDegreeRadian) + mytempVectorY * cos(rotateDegreeRadian) - point1y * (cos(rotateDegreeRadian) - 1) - point1x * sin(rotateDegreeRadian);
}
void myAnimation(int t)
{
point1x = point1x + 0.1 * (animationPoint1x - point1x);
point1y = point1y + 0.1 * (animationPoint1y - point1y);
vector1x = vector1x + 0.1 * (animationVector1x - vector1x);
vector1y = vector1y + 0.1 * (animationVector1y - vector1y);
point2x = point2x + 0.1 * (animationPoint2x - point2x);
point2y = point2y + 0.1 * (animationPoint2y - point2y);
vector2x = vector2x + 0.1 * (animationVector2x - vector2x);
vector2y = vector2y + 0.1 * (animationVector2y - vector2y);
vector2_3x = vector2_3x + 0.1 * (animationVector2_3x - vector2_3x);
vector2_3y = vector2_3y + 0.1 * (animationVector2_3y - vector2_3y);
point3x = point3x + 0.1 * (animationPoint3x - point3x);
point3y = point3y + 0.1 * (animationPoint3y - point3y);
vector3x = vector3x + 0.1 * (animationVector3x - vector3x);
vector3y = vector3y + 0.1 * (animationVector3y - vector3y);
point4x = point4x + 0.1 * (animationPoint4x - point4x);
point4y = point4y + 0.1 * (animationPoint4y - point4y);
vector4x = vector4x + 0.1 * (animationVector4x - vector4x);
vector4y = vector4y + 0.1 * (animationVector4y - vector4y);
point5x = point5x + 0.1 * (animationPoint5x - point5x);
point5y = point5y + 0.1 * (animationPoint5y - point5y);
vector5x = vector5x + 0.1 * (animationVector5x - vector5x);
vector5y = vector5y + 0.1 * (animationVector5y - vector5y);
point6x = point6x + 0.1 * (animationPoint6x - point6x);
point6y = point6y + 0.1 * (animationPoint6y - point6y);
vector6x = vector6x + 0.1 * (animationVector6x - vector6x);
vector6y = vector6y + 0.1 * (animationVector6y - vector6y);
point7x = point7x + 0.1 * (animationPoint7x - point7x);
point7y = point7y + 0.1 * (animationPoint7y - point7y);
vector7x = vector7x + 0.1 * (animationVector7x - vector7x);
vector7y = vector7y + 0.1 * (animationVector7y - vector7y);
point8x = point8x + 0.1 * (animationPoint8x - point8x);
point8y = point8y + 0.1 * (animationPoint8y - point8y);
vector8x = vector8x + 0.1 * (animationVector8x - vector8x);
vector8y = vector8y + 0.1 * (animationVector8y - vector8y);
point9x = point9x + 0.1 * (animationPoint9x - point9x);
point9y = point9y + 0.1 * (animationPoint9y - point9y);
vector9x = vector9x + 0.1 * (animationVector9x - vector9x);
vector9y = vector9y + 0.1 * (animationVector9y - vector9y);
point10x = point10x + 0.1 * (animationPoint10x - point10x);
point10y = point10y + 0.1 * (animationPoint10y - point10y);
vector10x = vector10x + 0.1 * (animationVector10x - vector10x);
vector10y = vector10y + 0.1 * (animationVector10y - vector10y);
vector10_9x = vector10_9x + 0.1 * (animationVector10_9x - vector10_9x);
vector10_9y = vector10_9y + 0.1 * (animationVector10_9y - vector10_9y);
vector10_13x = vector10_13x + 0.1 * (animationVector10_13x - vector10_13x);
vector10_13y = vector10_13y + 0.1 * (animationVector10_13y - vector10_13y);
point11x = point11x + 0.1 * (animationPoint11x - point11x);
point11y = point11y + 0.1 * (animationPoint11y - point11y);
vector11x = vector11x + 0.1 * (animationVector11x - vector11x);
vector11y = vector11y + 0.1 * (animationVector11y - vector11y);
point12x = point12x + 0.1 * (animationPoint12x - point12x);
point12y = point12y + 0.1 * (animationPoint12y - point12y);
vector12x = vector12x + 0.1 * (animationVector12x - vector12x);
vector12y = vector12y + 0.1 * (animationVector12y - vector12y);
vector12_10x = vector12_10x + 0.1 * (animationVector12_10x - vector12_10x);
vector12_10y = vector12_10y + 0.1 * (animationVector12_10y - vector12_10y);
point13x = point13x + 0.1 * (animationPoint13x - point13x);
point13y = point13y + 0.1 * (animationPoint13y - point13y);
vector13x = vector13x + 0.1 * (animationVector13x - vector13x);
vector13y = vector13y + 0.1 * (animationVector13y - vector13y);
vector13_14x = vector13_14x + 0.1 * (animationVector13_14x - vector13_14x);
vector13_14y = vector13_14y + 0.1 * (animationVector13_14y - vector13_14y);
point14x = point14x + 0.1 * (animationPoint14x - point14x);
point14y = point14y + 0.1 * (animationPoint14y - point14y);
vector14x = vector14x + 0.1 * (animationVector14x - vector14x);
vector14y = vector14y + 0.1 * (animationVector14y - vector14y);
point15x = point15x + 0.1 * (animationPoint15x - point15x);
point15y = point15y + 0.1 * (animationPoint15y - point15y);
vector15x = vector15x + 0.1 * (animationVector15x - vector15x);
vector15y = vector15y + 0.1 * (animationVector15y - vector15y);
vector15_16x = vector15_16x + 0.1 * (animationVector15_16x - vector15_16x);
vector15_16y = vector15_16y + 0.1 * (animationVector15_16y - vector15_16y);
point16x = point16x + 0.1 * (animationPoint16x - point16x);
point16y = point16y + 0.1 * (animationPoint16y - point16y);
vector16x = vector16x + 0.1 * (animationVector16x - vector16x);
vector16y = vector16y + 0.1 * (animationVector16y - vector16y);
vector16_17x = vector16_17x + 0.1 * (animationVector16_17x - vector16_17x);
vector16_17y = vector16_17y + 0.1 * (animationVector16_17y - vector16_17y);
point17x = point17x + 0.1 * (animationPoint17x - point17x);
point17y = point17y + 0.1 * (animationPoint17y - point17y);
vector17x = vector17x + 0.1 * (animationVector17x - vector17x);
vector17y = vector17y + 0.1 * (animationVector17y - vector17y);
point18x = point18x + 0.1 * (animationPoint18x - point18x);
point18y = point18y + 0.1 * (animationPoint18y - point18y);
vector18x = vector18x + 0.1 * (animationVector18x - vector18x);
vector18y = vector18y + 0.1 * (animationVector18y - vector18y);
point19x = point19x + 0.1 * (animationPoint19x - point19x);
point19y = point19y + 0.1 * (animationPoint19y - point19y);
vector19x = vector19x + 0.1 * (animationVector19x - vector19x);
vector19y = vector19y + 0.1 * (animationVector19y - vector19y);
point20x = point20x + 0.1 * (animationPoint20x - point20x);
point20y = point20y + 0.1 * (animationPoint20y - point20y);
vector20x = vector20x + 0.1 * (animationVector20x - vector20x);
vector20y = vector20y + 0.1 * (animationVector20y - vector20y);
point21x = point21x + 0.1 * (animationPoint21x - point21x);
point21y = point21y + 0.1 * (animationPoint21y - point21y);
vector21x = vector21x + 0.1 * (animationVector21x - vector21x);
vector21y = vector21y + 0.1 * (animationVector21y - vector21y);
point22x = point22x + 0.1 * (animationPoint22x - point22x);
point22y = point22y + 0.1 * (animationPoint22y - point22y);
vector22x = vector22x + 0.1 * (animationVector22x - vector22x);
vector22y = vector22y + 0.1 * (animationVector22y - vector22y);
point23x = point23x + 0.1 * (animationPoint23x - point23x);
point23y = point23y + 0.1 * (animationPoint23y - point23y);
vector23x = vector23x + 0.1 * (animationVector23x - vector23x);
vector23y = vector23y + 0.1 * (animationVector23y - vector23y);
point24x = point24x + 0.1 * (animationPoint24x - point24x);
point24y = point24y + 0.1 * (animationPoint24y - point24y);
vector24x = vector24x + 0.1 * (animationVector24x - vector24x);
vector24y = vector24y + 0.1 * (animationVector24y - vector24y);
point25x = point25x + 0.1 * (animationPoint25x - point25x);
point25y = point25y + 0.1 * (animationPoint25y - point25y);
vector25x = vector25x + 0.1 * (animationVector25x - vector25x);
vector25y = vector25y + 0.1 * (animationVector25y - vector25y);
point26x = point26x + 0.1 * (animationPoint26x - point26x);
point26y = point26y + 0.1 * (animationPoint26y - point26y);
vector26x = vector26x + 0.1 * (animationVector26x - vector26x);
vector26y = vector26y + 0.1 * (animationVector26y - vector26y);
point27x = point27x + 0.1 * (animationPoint27x - point27x);
point27y = point27y + 0.1 * (animationPoint27y - point27y);
vector27x = vector27x + 0.1 * (animationVector27x - vector27x);
vector27y = vector27y + 0.1 * (animationVector27y - vector27y);
point28x = point28x + 0.1 * (animationPoint28x - point28x);
point28y = point28y + 0.1 * (animationPoint28y - point28y);
vector28x = vector28x + 0.1 * (animationVector28x - vector28x);
vector28y = vector28y + 0.1 * (animationVector28y - vector28y);
point29x = point29x + 0.1 * (animationPoint29x - point29x);
point29y = point29y + 0.1 * (animationPoint29y - point29y);
vector29x = vector29x + 0.1 * (animationVector29x - vector29x);
vector29y = vector29y + 0.1 * (animationVector29y - vector29y);
point30x = point30x + 0.1 * (animationPoint30x - point30x);
point30y = point30y + 0.1 * (animationPoint30y - point30y);
vector30x = vector30x + 0.1 * (animationVector30x - vector30x);
vector30y = vector30y + 0.1 * (animationVector30y - vector30y);
point31x = point31x + 0.1 * (animationPoint31x - point31x);
point31y = point31y + 0.1 * (animationPoint31y - point31y);
vector31x = vector31x + 0.1 * (animationVector31x - vector31x);
vector31y = vector31y + 0.1 * (animationVector31y - vector31y);
vector31_32x = vector31_32x + 0.1 * (animationVector31_32x - vector31_32x);
vector31_32y = vector31_32y + 0.1 * (animationVector31_32y - vector31_32y);
point32x = point32x + 0.1 * (animationPoint32x - point32x);
point32y = point32y + 0.1 * (animationPoint32y - point32y);
vector32x = vector32x + 0.1 * (animationVector32x - vector32x);
vector32y = vector32y + 0.1 * (animationVector32y - vector32y);
vector32_31x = vector32_31x + 0.1 * (animationVector32_31x - vector32_31x);
vector32_31y = vector32_31y + 0.1 * (animationVector32_31y - vector32_31y);
point33x = point33x + 0.1 * (animationPoint33x - point33x);
point33y = point33y + 0.1 * (animationPoint33y - point33y);
vector33x = vector33x + 0.1 * (animationVector33x - vector33x);
vector33y = vector33y + 0.1 * (animationVector33y - vector33y);
vector33_34x = vector33_34x + 0.1 * (animationVector33_34x - vector33_34x);
vector33_34y = vector33_34y + 0.1 * (animationVector33_34y - vector33_34y);
point34x = point34x + 0.1 * (animationPoint34x - point34x);
point34y = point34y + 0.1 * (animationPoint34y - point34y);
vector34x = vector34x + 0.1 * (animationVector34x - vector34x);
vector34y = vector34y + 0.1 * (animationVector34y - vector34y);
vector34_33x = vector34_33x + 0.1 * (animationVector34_33x - vector34_33x);
vector34_33y = vector34_33y + 0.1 * (animationVector34_33y - vector34_33y);
point35x = point35x + 0.1 * (animationPoint35x - point35x);
point35y = point35y + 0.1 * (animationPoint35y - point35y);
vector35x = vector35x + 0.1 * (animationVector35x - vector35x);
vector35y = vector35y + 0.1 * (animationVector35y - vector35y);
vector35_36x = vector35_36x + 0.1 * (animationVector35_36x - vector35_36x);
vector35_36y = vector35_36y + 0.1 * (animationVector35_36y - vector35_36y);
point36x = point36x + 0.1 * (animationPoint36x - point36x);
point36y = point36y + 0.1 * (animationPoint36y - point36y);
vector36x = vector36x + 0.1 * (animationVector36x - vector36x);
vector36y = vector36y + 0.1 * (animationVector36y - vector36y);
glutPostRedisplay();
glutTimerFunc(100, myAnimation, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment