|
Post by bplus on Jul 15, 2024 0:13:17 GMT
Simple Patterns _Title "Simple Patterns" ' B+ 2020-08-12 ' rework Simple Pattern from SmallBASIC Screen _NewImage(1024, 700, 32) _Delay .25 _ScreenMove _Middle s = 145: cd = 2 While 1 flip = 1 - flip If flip Then For k = .005 To .995 Step .005 GoSub drawIt Next Else For k = .995 To .005 Step -.005 GoSub drawIt Next End If cd = cd * .987654321 Wend
drawIt: Cls For i = 0 To 1024 For j = 0 To 700 x = i * s / 600: y = j * s / 600 c = x * x + y * y d = c / cd d = d - Int(d) If d < k Then PSet (i, j) Next Next _Display _Limit 20 Return Attachments:![](//storage.proboards.com/7292714/thumbnailer/MzGTEhxZWWAaMkuPJjQg.png)
|
|
|
Post by aurelvz on Jul 15, 2024 11:28:02 GMT
why you use Redim in carbonated circles i have code without
|
|
|
Post by bplus on Jul 15, 2024 12:44:05 GMT
According to developer Luke, REDIM is as good as or better than redim. There was a period of time, I call my REDIM period that I used REDIM instead of any DIM statement even Redim i As Integer! We were at .org during that time period and Luke and Fell were much more active.
OK reviewing Carbonated Circles, I see it comes from before my REDIM time, I was preparing to REDIM _Preserve my arrays if they needed to be expanded.
|
|
|
Post by aurelvz on Jul 16, 2024 15:25:44 GMT
REDIM arrays dynmicaly is not problem in small programs but they eat lot of memory and they are time consuming in big programs
|
|
|
Post by bplus on Jul 17, 2024 0:26:11 GMT
That doesn't jive with my memory of Luke's comments about REDIM, I am checking on that...
|
|