Add(MainForm,2953706,245,133)
{
Width=505
Height=508
}
Add(PointHint,14615261,259,196)
{
Info=#11:Вычислитель|
Transparent=0
VAlign=0
Width=540
Height=417
}
Add(ScrollBox,12331734,301,133)
{
Width=475
Height=460
Color=-16777210
}
Add(Img_Polygon,9946245,756,406)
{
PointsArray=[]
Color=15793151
BgColor=-16777214
Style=1
Point(BgColor)
link(onDraw,11110144:doClear,[(813,412)(813,257)(655,257)(655,314)])
link(Bitmap,15264964:Bitmap,[(762,401)(750,401)(750,445)(807,445)(807,623)(202,623)])
link(PointsArray,15405981:Var3,[(769,341)])
}
Add(PaintBox,15264964,196,532)
{
Width=470
Height=455
Color=-16777215
link(onBeforeDraw,13784051:doStart,[(310,538)(310,440)])
}
Add(IntegerArray,11110144,679,294)
{
IntArray=[]
}
Add(ArrayRW,10228762,679,350)
{
Index=String(0)
link(Array,15405981:Var2,[])
link(Value,234763:Point,[(699,344)(742,344)(742,452)(790,452)(790,603)(755,603)])
}
Add(PointHint,10078547,665,273)
{
Info=#6:Массив|
Transparent=0
VAlign=0
Width=120
Height=123
}
Add(StrList,203896,595,476)
{
Strings=#2:%1|5:%1-13|5:%1-13|2:%1|5:%1+13|5:%1+13|
Point(doGetString)
Point(onGetString)
link(onGetString,4968258:doEvent1,[])
}
Add(For,1422994,497,385)
{
End=5
link(onEvent,12667245:doEvent1,[(559,391)(559,377)])
link(onStop,9946245:doDraw,[(661,398)(661,412)])
}
Add(PointXY,234763,749,553)
{
link(X,10303427:Result,[(755,537)(699,537)])
link(Y,1417223:Result,[(762,541)(720,541)(720,597)(678,597)])
}
Add(StrList,3347830,595,546)
{
Strings=#5:%1-15|4:%1-8|4:%1+8|5:%1+15|4:%1+8|4:%1-8|
Point(doGetString)
Point(onGetString)
link(onGetString,9768539:doEvent1,[(635,559)(635,552)])
}
Add(MathParse,1417223,672,553)
{
DataCount=1
MathStr=""
ResultType=0
Point(doMathStr)
link(X1,13784051:_Y,[(678,509)(405,509)])
}
Add(Hub,9768539,644,546)
{
link(onEvent1,1417223:doMathStr,[(666,552)(666,566)])
link(onEvent2,1417223:doCalc,[])
}
Add(MathParse,10303427,693,490)
{
DataCount=1
MathStr=""
ResultType=0
Point(doMathStr)
link(X1,13784051:_X,[(699,478)(398,478)])
}
Add(Hub,4968258,637,483)
{
link(onEvent1,10303427:doMathStr,[(672,489)(672,503)])
link(onEvent2,10303427:doCalc,[])
}
Add(GetDataEx,15405981,679,336)
{
link(Data,11110144:Array,[])
}
Add(PointHint,10156882,581,469)
{
Info=#13:X вычислитель|
Transparent=0
VAlign=0
Width=162
Height=67
}
Add(PointHint,3538784,581,532)
{
Info=#13:Y вычислитель|
Transparent=0
VAlign=0
Width=162
Height=74
}
Add(InlineCode,13784051,392,434)
{
WorkPoints=#7:doStart|
EventPoints=#8:onResult|5:onEnd|
VarPoints=#2:_X|2:_Y|
DataPoints=#6:_Rings|2:_L|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|21: fX, fY: integer;|9: public|44: onResult, onEnd, _Rings, _L: THI_Event;|52: procedure doStart(var _Data:TData; Index:word);|47: procedure _X(var _Data:TData; Index:word);|47: procedure _Y(var _Data:TData; Index:word);|5: end;|0:|14:implementation|0:|30:procedure THiAsmClass.doStart;|3:var|37: x, y: array [1..10000] of integer;|29: m, k, Xmax, Ymax: integer;|24: ring, rings, L: byte;|5:begin|63: rings := ToIntegerEvent(_Rings); //считываем количество колец|82: L := ToIntegerEvent(_L); //коэффицент увеличения, принадлежит натуральным числам|0:|47: for ring := 1 to rings do //проход по кольцам|7: begin|81: m := 1; k := 3 * ring * ring - 3 * ring; //сумма глобальных номеров до кольца|34: while (m <= (2 * ring + 1)) do|9: begin|31: if (m <= (ring + 1)) then|11: begin|39: y[k + m] := -1 * 25 * L * ring;|51: x[k + m] := L * (14 * ring + 28 * (1 - m));|39: y[k + 3 * ring + m] := -y[k+m];|39: x[k + 3 * ring + m] := -x[k+m];|9: end|10: else|11: begin|51: y[k + m] := 25 * L * ((-2) * ring + m - 1);|37: x[k + m] := L * 14 * (1 - m);|41: y[k + 3 * ring + m] := -y[k + m];|41: x[k + 3 * ring + m] := -x[k + m];|45: y[k + 4 * ring - m + 2] := -y[k + m];|45: x[k + 4 * ring - m + 2] := x[k + m];|45: y[k + 7 * ring - m + 2] := y[k + m];|45: x[k + 7 * ring - m + 2] := -x[k + m];|10: end;|17: m := m + 1;|8: end;|6: end;|31: k := 3 * rings * (1 + rings);|35: Xmax:=(27 * rings + 13) * L + 15;|35: Ymax:=(24 * rings + 15) * L + 15;|0:|18: for m:=1 to k do|7: begin|22: fX := x[m] + Xmax;|22: fY := y[m] + Ymax;|26: _hi_onEvent(onResult);|6: end;|21: _hi_onEvent(onEnd);|6:end; |0:|25:procedure THiAsmClass._X;|5:begin|23: dtInteger(_Data, fX);|4:end;|0:|25:procedure THiAsmClass._Y;|5:begin|23: dtInteger(_Data, fY);|4:end;|0:|4:end.|
link(onResult,1422994:doFor,[(487,440)(487,391)])
link(_Rings,15876831:Value,[(398,425)(335,425)])
link(_L,9602728:Value,[])
}
Add(Hub,12667245,567,371)
{
OutCount=3
link(onEvent1,203896:doGetString,[(627,377)(627,431)(573,431)(573,524)])
link(onEvent2,3347830:doGetString,[(611,384)(611,415)(561,415)(561,594)])
link(onEvent3,10228762:doAdd,[(642,391)])
}
Add(StrList,2479386,385,315)
{
Strings=#1:1|
Point(doGetString)
}
Add(StrList,12809070,315,315)
{
Strings=#1:1|
Point(doGetString)
}
Add(Memory,15876831,329,378)
{
Default=Integer(1)
}
Add(Memory,9602728,399,378)
{
Default=Integer(1)
}
Разработчик
Ответов: 26158
Рейтинг: 2127
|
|||
R2D2, ну какой (непереводимый местный диалект) цепляет массив к целочисленным точкам
|
|||
карма: 22 |
|