fork(1) download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void) {
  5. int i, numPoints = 200;
  6. double slope = sqrt(1.2) / sqrt(numPoints);
  7. for (i = 0; i < numPoints; i++) {
  8. double s = asin((double)i / (double)(numPoints - 1) * 2.0 - 1.0);
  9. double z = sin(s);
  10. double r = sqrt(1.0 - z * z);
  11. double ss = (2.0 * s + M_PI) / slope;
  12. double x = cos(ss) * r;
  13. double y = sin(ss) * r;
  14. printf("%lf,%lf,%lf,\"1\"\n", x, y, z);
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
0.000000,0.000000,-1.000000,"1"
-0.122577,-0.070529,-0.989950,"1"
0.090926,-0.177565,-0.979899,"1"
0.243052,0.017843,-0.969849,"1"
0.136520,0.245251,-0.959799,"1"
-0.112064,0.292265,-0.949749,"1"
-0.313334,0.137072,-0.939698,"1"
-0.349966,-0.115230,-0.929648,"1"
-0.212345,-0.330529,-0.919598,"1"
0.029431,-0.414556,-0.909548,"1"
0.274606,-0.339846,-0.899497,"1"
0.435162,-0.139706,-0.889447,"1"
0.461812,0.115716,-0.879397,"1"
0.351203,0.347696,-0.869347,"1"
0.138581,0.492346,-0.859296,"1"
-0.117746,0.514701,-0.849246,"1"
-0.354113,0.412740,-0.839196,"1"
-0.516814,0.213120,-0.829146,"1"
-0.572368,-0.038438,-0.819095,"1"
-0.511826,-0.288928,-0.809045,"1"
-0.349609,-0.489265,-0.798995,"1"
-0.118199,-0.602989,-0.788945,"1"
0.139567,-0.611428,-0.778894,"1"
0.378870,-0.515108,-0.768844,"1"
0.560466,-0.331827,-0.758794,"1"
0.656406,-0.092268,-0.748744,"1"
0.653329,0.165812,-0.738693,"1"
0.553230,0.403752,-0.728643,"1"
0.371967,0.587592,-0.718593,"1"
0.136004,0.692438,-0.708543,"1"
-0.121920,0.705155,-0.698492,"1"
-0.367525,0.625278,-0.688442,"1"
-0.569458,0.464222,-0.678392,"1"
-0.703008,0.243103,-0.668342,"1"
-0.752691,-0.010417,-0.658291,"1"
-0.713536,-0.265799,-0.648241,"1"
-0.591061,-0.493315,-0.638191,"1"
-0.400069,-0.667371,-0.628141,"1"
-0.162519,-0.769124,-0.618090,"1"
0.095220,-0.788175,-0.608040,"1"
0.345395,-0.723263,-0.597990,"1"
0.561827,-0.581960,-0.587940,"1"
0.722518,-0.379488,-0.577889,"1"
0.811684,-0.136849,-0.567839,"1"
0.821042,0.121499,-0.557789,"1"
0.750307,0.370164,-0.547739,"1"
0.606900,0.585289,-0.537688,"1"
0.404948,0.746736,-0.527638,"1"
0.163720,0.839820,-0.517588,"1"
-0.094319,0.856452,-0.507538,"1"
-0.345650,0.795633,-0.497487,"1"
-0.567825,0.663310,-0.487437,"1"
-0.741404,0.471616,-0.477387,"1"
-0.851545,0.237631,-0.467337,"1"
-0.889132,-0.018244,-0.457286,"1"
-0.851380,-0.274102,-0.447236,"1"
-0.741879,-0.508414,-0.437186,"1"
-0.570122,-0.701795,-0.427136,"1"
-0.350572,-0.838534,-0.417085,"1"
-0.101354,-0.907772,-0.407035,"1"
0.157285,-0.904248,-0.396985,"1"
0.404639,-0.828582,-0.386935,"1"
0.621184,-0.687087,-0.376884,"1"
0.790070,-0.491144,-0.366834,"1"
0.898364,-0.256217,-0.356784,"1"
0.937963,-0.000576,-0.346734,"1"
0.906107,0.256151,-0.336683,"1"
0.805482,0.494479,-0.326633,"1"
0.643913,0.696528,-0.316583,"1"
0.433693,0.847318,-0.306533,"1"
0.190591,0.935828,-0.296482,"1"
-0.067359,0.955730,-0.286432,"1"
-0.321212,0.905779,-0.276382,"1"
-0.552495,0.789821,-0.266332,"1"
-0.744531,0.616436,-0.256281,"1"
-0.883605,0.398262,-0.246231,"1"
-0.959900,0.151033,-0.236181,"1"
-0.968139,-0.107572,-0.226131,"1"
-0.907901,-0.359201,-0.216080,"1"
-0.783589,-0.586123,-0.206030,"1"
-0.604069,-0.772459,-0.195980,"1"
-0.382004,-0.905264,-0.185930,"1"
-0.132941,-0.975394,-0.175879,"1"
0.125796,-0.978098,-0.165829,"1"
0.376305,-0.913306,-0.155779,"1"
0.601343,-0.785589,-0.145729,"1"
0.785495,-0.603813,-0.135678,"1"
0.916209,-0.380498,-0.125628,"1"
0.984629,-0.130949,-0.115578,"1"
0.986169,0.127806,-0.105528,"1"
0.920798,0.378174,-0.095477,"1"
0.793014,0.603184,-0.085427,"1"
0.611524,0.787627,-0.075377,"1"
0.388632,0.919074,-0.065327,"1"
0.139408,0.988691,-0.055276,"1"
-0.119338,0.991823,-0.045226,"1"
-0.370184,0.928292,-0.035176,"1"
-0.596260,0.802398,-0.025126,"1"
-0.782379,0.622620,-0.015075,"1"
-0.916043,0.401048,-0.005025,"1"
-0.988280,0.152569,0.005025,"1"
-0.994238,-0.106129,0.015075,"1"
-0.933510,-0.357669,0.025126,"1"
-0.810165,-0.585146,0.035176,"1"
-0.632476,-0.773259,0.045226,"1"
-0.412378,-0.909334,0.055276,"1"
-0.164675,-0.984182,0.065327,"1"
0.093948,-0.992720,0.075377,"1"
0.346036,-0.934324,0.085427,"1"
0.574536,-0.812891,0.095477,"1"
0.763946,-0.636593,0.105528,"1"
0.901370,-0.417341,0.115578,"1"
0.977403,-0.170005,0.125628,"1"
0.986785,0.088583,0.135678,"1"
0.928789,0.340755,0.145729,"1"
0.807297,0.569214,0.155779,"1"
0.630569,0.758211,0.165829,"1"
0.410709,0.894642,0.175879,"1"
0.162866,0.968971,0.185930,"1"
-0.095787,0.975918,0.195980,"1"
-0.347226,0.914869,0.206030,"1"
-0.573821,0.789961,0.216080,"1"
-0.759574,0.609846,0.226131,"1"
-0.891263,0.387129,0.236181,"1"
-0.959404,0.137530,0.246231,"1"
-0.958974,-0.121200,0.256281,"1"
-0.889823,-0.370516,0.266332,"1"
-0.756756,-0.592397,0.276382,"1"
-0.569248,-0.770658,0.286432,"1"
-0.340832,-0.892150,0.296482,"1"
-0.088168,-0.947768,0.306533,"1"
0.170130,-0.933183,0.316583,"1"
0.414839,-0.849246,0.326633,"1"
0.627554,-0.702011,0.336683,"1"
0.792082,-0.502376,0.346734,"1"
0.895709,-0.265348,0.356784,"1"
0.930243,-0.008978,0.366834,"1"
0.892729,0.246968,0.376884,"1"
0.785793,0.482504,0.386935,"1"
0.617557,0.678989,0.396985,"1"
0.401118,0.820626,0.407035,"1"
0.153624,0.895790,0.417085,"1"
-0.105017,0.898068,0.427136,"1"
-0.353679,0.826910,0.437186,"1"
-0.571733,0.687824,0.447236,"1"
-0.740772,0.492083,0.457286,"1"
-0.846222,0.255937,0.467337,"1"
-0.878693,-0.000628,0.477387,"1"
-0.834939,-0.255504,0.487437,"1"
-0.718334,-0.486316,0.497487,"1"
-0.538781,-0.672399,0.507538,"1"
-0.312043,-0.796701,0.517588,"1"
-0.058508,-0.847452,0.527638,"1"
0.198524,-0.819438,0.537688,"1"
0.434912,-0.714726,0.547739,"1"
0.627937,-0.542740,0.557789,"1"
0.758543,-0.319642,0.567839,"1"
0.813359,-0.067016,0.577889,"1"
0.786262,0.190049,0.587940,"1"
0.679319,0.425363,0.597990,"1"
0.502937,0.614281,0.608040,"1"
0.275155,0.736379,0.618090,"1"
0.020078,0.777841,0.628141,"1"
-0.234462,0.733307,0.638191,"1"
-0.459825,0.606914,0.648241,"1"
-0.629792,0.412327,0.658291,"1"
-0.723771,0.171684,0.668342,"1"
-0.729582,-0.086570,0.678392,"1"
-0.645468,-0.330785,0.688442,"1"
-0.480967,-0.529886,0.698492,"1"
-0.256424,-0.657430,0.708543,"1"
-0.001028,-0.695430,0.718593,"1"
0.250544,-0.637422,0.728643,"1"
0.462606,-0.490232,0.738693,"1"
0.603566,-0.274026,0.748744,"1"
0.651012,-0.020369,0.758794,"1"
0.595980,0.231704,0.768844,"1"
0.445614,0.441307,0.778894,"1"
0.223498,0.572376,0.788945,"1"
-0.032814,0.600442,0.798995,"1"
-0.277153,0.518297,0.809045,"1"
-0.462552,0.339306,0.819095,"1"
-0.550523,0.097171,0.829146,"1"
-0.520200,-0.158563,0.839196,"1"
-0.375336,-0.371354,0.849246,"1"
-0.146975,-0.489906,0.859296,"1"
0.110058,-0.481792,0.869347,"1"
0.327797,-0.345268,0.879397,"1"
0.442237,-0.115368,0.889447,"1"
0.414005,0.139656,0.899497,"1"
0.247097,0.334165,0.909548,"1"
-0.002046,0.392855,0.919598,"1"
-0.233643,0.284895,0.929648,"1"
-0.337985,0.052277,0.939698,"1"
-0.251288,-0.186633,0.949749,"1"
-0.016242,-0.280218,0.959799,"1"
0.195604,-0.145367,0.969849,"1"
0.171951,0.101143,0.979899,"1"
-0.065660,0.125253,0.989950,"1"
0.000000,-0.000000,1.000000,"1"