Вот любопытные фигуры Френеля рисует, аж свет начинает преломляться в глазах или в мозгу интерференция...
Add(Img_Point,10361775,455,315)
{
Color=-16777203
Size=2
Point(X)
Point(Y)
link(onDraw,12465343:doRefresh,[(499,321)(499,265)(443,265)(443,209)])
link(Bitmap,12465343:Bitmap,[])
link(X,14307840:Result,[(468,303)(335,303)])
link(Y,16095580:Result,[(475,303)(384,303)])
}
Add(Timer,11502362,126,308)
{
Interval=100
link(onTimer,8238168:doFor,[(194,314)(194,286)])
}
Add(MainForm,5818658,140,161)
{
@Hint=#8:(c) Aziz|
Width=500
Height=500
Caption="Рисование окружности по формуле"
}
Add(PaintBox,12465343,455,203)
{
Left=55
Top=10
Width=245
Height=218
Align=5
Color=16777215
WinStyle=1
ColorSp=0
Point(onClick)
}
Add(MathParse,14307840,329,259)
{
@Hint=#38:Math.sin((Math.PI * angl / 180) / 2), |30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)|
DataCount=3
MathStr="%3 + %2 * cos (%1)"
AngleMode=1
link(X2,9867155:Var2,[(342,239)(321,239)])
link(X3,11880627:Var2,[(349,229)(363,229)])
}
Add(For,8238168,231,280)
{
End=359
link(onEvent,8911218:doEvent1,[(282,286)(282,265)])
link(onStop,10720589:doOperation,[(275,293)(275,241)(219,241)(219,188)])
}
Add(MathParse,16095580,378,259)
{
@Hint=#30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)|
DataCount=3
MathStr="%3 + %2 * sin(-%1)"
AngleMode=1
link(X2,9867155:Var3,[(391,215)])
link(X3,11880627:Var3,[(398,222)])
}
Add(Hub,8911218,301,259)
{
OutCount=5
link(onEvent1,14307840:doCalc,[])
link(onEvent2,16095580:doCalc,[(349,272)(349,265)])
link(onEvent4,10361775:doDraw,[(385,286)(385,321)])
link(onEvent5,5818658:doCaption,[(327,293)(327,230)(128,230)(128,167)])
}
Add(Memory,13135093,315,168)
{
@Hint=#6:Radius|
Default=Integer(150)
}
Add(Memory,7855591,357,168)
{
@Hint=#6:Centre|
Default=Integer(240)
}
Add(GetDataEx,9867155,315,210)
{
link(Data,13135093:Value,[])
}
Add(GetDataEx,11880627,357,217)
{
link(Data,7855591:Value,[])
}
Add(Math,10720589,231,182)
{
OpType=1
Op2=5
link(onResult,13135093:doValue,[(289,188)(289,174)])
link(Op1,9867155:Var1,[(237,170)(277,170)(277,215)])
}
--- Добавлено в 2023-03-29 20:18:05
А вот и спиралька
Add(Img_Point,10361775,455,315)
{
Color=-16777203
Size=2
Point(X)
Point(Y)
link(onDraw,12465343:doRefresh,[(499,321)(499,265)(443,265)(443,209)])
link(Bitmap,12465343:Bitmap,[])
link(X,14307840:Result,[(468,303)(335,303)])
link(Y,16095580:Result,[(475,303)(384,303)])
}
Add(Timer,11502362,126,308)
{
Interval=100
Enable=1
AutoStop=1
link(onTimer,12589365:doWork2,[(181,314)(181,286)])
}
Add(MainForm,5818658,140,161)
{
@Hint=#8:(c) Aziz|
Width=500
Height=500
Caption="Рисование окружности по формуле"
link(onCreate,11502362:doTimer,[(184,181)(184,247)(114,247)(114,314)])
}
Add(PaintBox,12465343,455,203)
{
Left=55
Top=10
Width=245
Height=218
Align=5
Color=16777215
WinStyle=1
ColorSp=0
Point(onClick)
}
Add(MathParse,14307840,329,259)
{
@Hint=#38:Math.sin((Math.PI * angl / 180) / 2), |30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)|
DataCount=3
MathStr="%3 + %2 * cos (%1)"
AngleMode=1
link(X2,9867155:Var2,[(342,239)(321,239)])
link(X3,11880627:Var2,[(349,229)(363,229)])
}
Add(For,8238168,231,280)
{
End=359
link(onEvent,8911218:doEvent1,[(282,286)(282,265)])
link(onStop,16059413:doCompare,[(275,293)(275,349)])
}
Add(MathParse,16095580,378,259)
{
@Hint=#30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)|
DataCount=3
MathStr="%3 + %2 * sin(-%1)"
AngleMode=1
link(X2,9867155:Var3,[(391,215)])
link(X3,11880627:Var3,[(398,222)])
}
Add(Hub,8911218,301,259)
{
OutCount=5
link(onEvent1,14307840:doCalc,[])
link(onEvent2,16095580:doCalc,[(349,272)(349,265)])
link(onEvent3,10720589:doOperation,[(327,279)(327,233)(219,233)(219,188)])
link(onEvent4,10361775:doDraw,[(385,286)(385,321)])
link(onEvent5,5818658:doCaption,[(327,293)(327,230)(128,230)(128,167)])
}
Add(Memory,13135093,315,168)
{
@Hint=#6:Radius|
Default=Integer(150)
}
Add(Memory,7855591,357,168)
{
@Hint=#6:Centre|
Default=Integer(240)
}
Add(GetDataEx,9867155,315,210)
{
link(Data,13135093:Value,[])
}
Add(GetDataEx,11880627,357,217)
{
link(Data,7855591:Value,[])
}
Add(Math,10720589,231,182)
{
OpType=1
Op2=0.02
link(onResult,13135093:doValue,[(289,188)(289,174)])
link(Op1,9867155:Var1,[(237,170)(277,170)(277,215)])
}
Add(If_else,16059413,287,343)
{
Type=3
Op2=Integer(1)
link(onFalse,12589365:doWork3,[(331,356)(331,322)(207,322)])
link(Op1,10720589:Result,[(293,279)(237,279)])
}
Add(HubEx,12589365,203,280)
{
link(onEvent,8238168:doFor,[])
}
--- Добавлено в 2023-03-29 20:48:16
Чуть упростил и замедлил
Add(Img_Point,10361775,455,315)
{
Color=-16777203
Size=2
Point(X)
Point(Y)
link(onDraw,12465343:doRefresh,[(499,321)(499,265)(443,265)(443,209)])
link(Bitmap,12465343:Bitmap,[])
link(X,14307840:Result,[(468,303)(335,303)])
link(Y,16095580:Result,[(475,303)(384,303)])
}
Add(Timer,11502362,147,343)
{
Interval=10
link(onTimer,10043336:doNext,[])
}
Add(MainForm,5818658,140,161)
{
@Hint=#8:(c) Aziz|
Width=500
Height=500
Caption="Рисование окружности по формуле"
}
Add(PaintBox,12465343,455,203)
{
Left=55
Top=10
Width=245
Height=218
Align=5
Color=16777215
WinStyle=1
ColorSp=0
Point(onClick)
}
Add(MathParse,14307840,329,259)
{
@Hint=#38:Math.sin((Math.PI * angl / 180) / 2), |30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)|
DataCount=3
MathStr="%3 + %2 * cos (%1)"
AngleMode=1
link(X2,9867155:Var2,[(342,239)(321,239)])
link(X3,11880627:Var2,[(349,229)(363,229)])
}
Add(CounterEx,10043336,231,343)
{
Max=359
Point(doReset)
Point(onThroughMax)
link(onNext,8911218:doEvent1,[(282,349)(282,265)])
link(onThroughMax,16059413:doCompare,[])
}
Add(MathParse,16095580,378,259)
{
@Hint=#30:x = 150 + R * cos ((pi *2)* t)|31:y = 150 + R * sin (-(pi *2)* t)|27:%3 + %2 * cos ((pi *2)* %1)|
DataCount=3
MathStr="%3 + %2 * sin(-%1)"
AngleMode=1
link(X2,9867155:Var3,[(391,215)])
link(X3,11880627:Var3,[(398,222)])
}
Add(Hub,8911218,301,259)
{
OutCount=5
link(onEvent1,14307840:doCalc,[])
link(onEvent2,16095580:doCalc,[(349,272)(349,265)])
link(onEvent3,10720589:doOperation,[(327,279)(327,233)(219,233)(219,167)])
link(onEvent4,10361775:doDraw,[(385,286)(385,321)])
link(onEvent5,5818658:doCaption,[(327,293)(327,230)(128,230)(128,167)])
}
Add(Memory,7855591,357,168)
{
@Hint=#6:Centre|
Default=Integer(240)
}
Add(GetDataEx,9867155,315,210)
{
link(Data,10348906:Var3,[(321,204)(302,204)(302,215)])
}
Add(GetDataEx,11880627,357,217)
{
link(Data,7855591:Value,[])
}
Add(Math,10720589,287,161)
{
OpType=1
Default=150
Point(doClear)
link(Op1,10348906:Var1,[(293,149)(284,149)(284,215)])
link(Op2,12715640:Value,[])
}
Add(If_else,16059413,287,350)
{
Type=3
Op2=Integer(1)
link(onTrue,10720589:doClear,[(331,356)(331,276)(219,276)(219,174)])
link(Op1,10348906:Var2,[])
}
Add(Memory,12715640,294,112)
{
@Hint=#6:Centre|
Default=Real(0.02)
}
Add(GetDataEx,10348906,287,210)
{
link(Data,10720589:Result,[])
}