like my palm trees?

Miscellaneous Forums/Graphics Showcase/like my palm trees?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Just made some better leaves using a quick algorthim I wrote.
I then took the output of this and used photoshop to add texture to the plain color areas.

Here's the code - someone might be able to modify it for something else:

Graphics 800, 600

SetBuffer FrontBuffer()

Const centerX# = 256
Const centerY# = 256
Const brLen# = 355
Const Spacing# = 10

For ang# = 45.0 To 315 Step 90.0
	Color 255, 155, 100
	
	For i = 1 To 100
		Line centerX+Rnd(-3,+3), centerY+Rnd(-3,+3), centerX + brLen * Cos(ang), centerY + brLen * Sin(ang)
	Next
	
	
	
	Color 0, 155, 0
	For n# = 1 To brLen Step Spacing
		For n2# = n To (n + Spacing*0.5) Step 0.7
			cx# = centerX + n2 * Cos(ang)
			cy# = centerY + n2 * Sin(ang)
			
			
			lLen# = 100*Cos(n/2.5-50)
			lLen = lLen * Rnd(0.2, 1.2)
			
			ang2# = ang-35
			cx2# = cx + 0.02 * (brLen-n) * Cos(ang2)
			cy2# = cy + 0.02 * (brLen-n) * Sin(ang2)
			Line cx2, cy2, cx2 + lLen * Cos(ang2), cy + lLen* Sin(ang2)
			
			ang2# = ang+35
			cx2# = cx + 0.02 * (brLen-n) * Cos(ang2)
			cy2# = cy + 0.02 * (brLen-n) * Sin(ang2)
			Line cx2, cy2, cx + lLen * Cos(ang2), cy + lLen* Sin(ang2)			
		Next
	Next	
	
Next

WaitKey
End




here's the output: