Changeset 383
- Timestamp:
- 04/11/07 02:55:50 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/LaserLine_2.0/Src/Sequencing/Generators/LZ3DTorus.m
r362 r383 32 32 w = 25; 33 33 34 xs = 10/35.;35 ys = 31/35.;36 zs = 27/35.;34 xs = 3/35.; 35 ys = 5/35.; 36 zs = 4/35.; 37 37 } 38 38 return self; trunk/LaserLine_2.0/Src/Sequencing/Generators/LZSinewave.m
r369 r383 17 17 if(self) 18 18 { 19 freq_x = 9;20 freq_y = 8;19 freq_x = 8; 20 freq_y = 9; 21 21 } 22 22 return self; trunk/LaserLine_2.0/Src/Sequencing/Generators/LZSpirograph.m
r362 r383 17 17 if(self) 18 18 { 19 r = 70; 20 R = 1 50;19 r = 70;//70 20 R = 160; 21 21 d = 220; 22 22 } … … 27 27 - (RawFrame)renderAtPosition:(float)position 28 28 { 29 unsigned pointCount = 1000;29 unsigned pointCount = 800; 30 30 RawPoint *points = malloc(sizeof(RawPoint)*pointCount); 31 31 RawFrame frame = {points, pointCount}; … … 36 36 for(i = 0; i < pointCount; i++) 37 37 { 38 float t_p = (i/((float)pointCount-1))*2*3.14159 *10+t;38 float t_p = (i/((float)pointCount-1))*2*3.1415926535*10+t; 39 39 40 40 points[i].x = ((R+r)*cos(t_p) - (d)*cos((R+r)/r*(t_p)))/(R+r+d)*32767; … … 47 47 points[i].r = points[i].g = points[i].b = 0xFF; 48 48 } 49 50 points[pointCount-1].r = points[pointCount-1].g = points[pointCount-1].b =0;49 50 points[pointCount-1].r = points[pointCount-1].g = points[pointCount-1].b = 0x00; 51 51 52 52 return frame;
