0 Members and 1 Guest are viewing this topic.
:ZStandard:ZInteger:AxesOff:Degree:SortA L1:DelVar BDelVar D25→E:For(Z,1,dim(L1:B+360L1(Z)/sum(L1→F:25sin(F→G:25cos(F→H:5sin(.5(B+F→I:5cos(.5(B+F→J:Line(I,J,D+I,E+J:Line(I,J,G+I,H+J:Line(D+I,E+J,G+I,H+J:F→B:G→D:H→E:EndGenerated by SourceCoder, © 2005-2010 Cemetech
Nice! The original program is 130. Does yours save the percentages to L2?
:Degree:AxesOff:ZInteger:L1/(sum(L1))->L2:Circle(0,0,31:1->A:0->D:For(A,1,dim(L2:360*L2(A)->B:Line(0,0,31*sin(B+D),31*cos(B+D)):D+B->D:End
Oh yeah, you could divide the entire list L1 by a number!Great job. Now try optimizing the exploded version...
Quote from: Deep Thought on September 03, 2010, 07:52:59 pmNice! The original program is 130. Does yours save the percentages to L2?Yes here is codeCode: [Select]:Degree:AxesOff:ZInteger:L1/(sum(L1))->L2:Circle(0,0,31:1->A:0->D:For(A,1,dim(L2:360*L2(A)->B:Line(0,0,31*sin(B+D),31*cos(B+D)):D+B->D:EndEdit Subscript dosen't seem to work in code
Oh yeah, you could divide the entire list L1 by a number!Great job. Now try optimizing the exploded version...EDIT: No, code is WYSIWIG. You can use [ tt ] [ /tt ] instead.
DegreeAxesOffZStandard (You need to have this...)ZIntegerL1/sum(L1→L1Circle(0,0,31DelVarDFor(A,1,dim(L1360L1(A→BLine(0,0,31sin(B+D),31cos(B+DD+B→DEnd