08-12-2022, 02:37 PM
(This post was last modified: 08-12-2022, 02:45 PM by James D Jarvis.)
Pillars and Pyramids, Don't know if they fit the theme but they were fun to add in just to see what they looked like.
I moved the lakes to the top of the feature rendering then inserted this block between the lakes and the houses.
I moved the lakes to the top of the feature rendering then inserted this block between the lakes and the houses.
Code: (Select All)
Dim pillarx(30), pillary(30), pillarh(30), pillarwid(30)
Dim pyramidx(6), pyramidy(6), pyramidh(6)
'pillars
pc = Int(11 + Rnd * 20)
For p = 1 To pc
pillarx(p) = 100 + Rnd * 3300
pillary(p) = 100 + Rnd * 2300
pillarwid(p) = 4 + Int(Rnd * 20)
pillarh(p) = pillarwid(p) + Int(Rnd * (6 * pillarwid(p)))
pr = 30 + Rnd * 200: pg = 30 + Rnd * 200: pb = 30 + Rnd * 200
For px = pillarx(p) - pillarwid(p) To pillarx(p) + pillarwid(p)
Line (px, pillary(p))-(px, pillary(p) + pillarh(p)), _RGB32(pr, pg, pb)
Next
If Rnd * 6 > 2.5 Then
For px = pillarx(p) - (pillarwid(p) + pillarwid(p) / 5) To pillarx(p) + pillarwid(p) + pillarwid(p) / 5
Line (px, pillary(p) - pillarwid(p) / 3)-(px, pillary(p)), _RGB32(pr, pg, pb)
Next
End If
If Rnd * 6 < 4.8 Then
For px = pillarx(p) - (pillarwid(p) + pillarwid(p) / 5) To pillarx(p) + pillarwid(p) + pillarwid(p) / 5
Line (px, pillary(p) + pillarh(p))-(px, pillary(p) + pillarh(p) + pillarwid(p) / 3), _RGB32(pr, pg, pb)
Next
End If
For px = pillarx(p) + 1 To pillarx(p) - (pillarx(wid) - 1) Step -1
tpr = pr - n / 3: tpg = pg - n / 3: tpb = pb - n / 3
If tpr < 2 Then tpr = 2
If tpg < 2 Then tpg = 2
If tpb < 2 Then tpb = 2
Line (px, pillary(p))-(px, pillary(p) + pillarh(p)), _RGB32(tpr, tpg, tpb)
Next
tpr = pr + 40: tpg = pg + 40: tpb = pb + 40
If tpr > 254 Then tpr = 254
If tpg > 254 Then tpg = 254
If tpb > 254 Then tpb = 254
pcl = 3 + pillarwid(p) / 6
For px = pillarx(p) - pillarwid(p) To pillarx(p) + pillarwid(p) Step pcl
tpr = tpr + 2: tpg = tpg + 2: tpb = tpb + 2
If tpr > 254 Then tpr = 254
If tpg > 254 Then tpg = 254
If tpb > 254 Then tpb = 254
Line (px, pillary(p))-(px, pillary(p) + pillarh(p)), _RGB32(tpr, tpg, tpb)
Next
Next
'pyramids
pc = Int(1 + Rnd * 4)
For p = 1 To pc
pyramidx(p) = 100 + Rnd * 3300
pyramidy(p) = 100 + Rnd * 2300
pyramidh(p) = Int(Rnd * 120) + 60
pr = Rnd * 255: pg = Rnd * 255: pb = Rnd * 255
For n = 0 To pyramidh(p)
Line (pyramidx(p) - n, pyramidy(p) + n)-(pyramidx(p) + n, pyramidy(p) + n), _RGB32(pr, pg, pb), BF
tpr = pr - n / 2: tpg = pg = n / 2: tpb = pb - n / 3
If tpr < 2 Then tpr = 2
If tpg < 2 Then tpg = 2
If tpb < 2 Then tpb = 2
Line (pyramidx(p) - (n - 1), pyramidy(p) + n)-(pyramidx(p), pyramidy(p) + n), _RGB32(tpr, tpg, tpb), BF
Next n
Next p