Posts

Showing posts with the label basic programming language

Procedural Drawing for Grayscale Height Maps on MS Small Basic

Image
 I wrote this basic program for creating some height maps procedurally based on Fibonacci Series, that can be used for 3d modelling or some AI stylizing. Below image is created from seeds 06 and 12: And this is the 3D model of it: Link of code:  http://smallbasic.com/program/?TDJF742.000 Code: zero: GraphicsWindow.Width=1000 GraphicsWindow.Height=800 'Input seeds and step length ' angle seed 1: TextWindow.Show() TextWindow.WriteLine("Enter Angle Seed #1 (0-255):") don1=TextWindow.Read() ' angle seed 2: TextWindow.WriteLine("Enter Angle Seed #2 (0-255):") don2=TextWindow.Read() aci=don2/256*360 renk1= 0 adim=math.Remainder((128+don2/2)/(renk1+1),256) TextWindow.Hide() xx=GraphicsWindow.width/2 yy=GraphicsWindow.Height/2 GraphicsWindow.Title="Procedural painter | seeds: "+don1+" & "+don2 GraphicsWindow.BackgroundColor="Black" 'procedure loop start: GraphicsWindow.BrushColor = GraphicsWindow.GetColorFromRGB(renk1,renk1...

My New Spiral Procedural Drawing Program on Small Basic

Image
 I coded a new procedural drawing program which is using Fibonacci series with two seeds and draws spirals accordingly. The code takes gray tone, thickness of pen, step length and angle change from the Fibonacci series having these two seeds. This is the spiral created from the seeds 30 and 9: And this is the AI stylized image from above image: Small Basic Link of the code>>  http://smallbasic.com/program/?ZKDV668.000 Here is the code itself : zero: GraphicsWindow.Width=1024 GraphicsWindow.Height=768 Turtle.Speed = 10 radius=1 angle=0 'Input seeds and step length ' angle seed 1: TextWindow.Show() TextWindow.WriteLine("Enter Angle Seed #1 (0-255):") don1=TextWindow.Read() ' angle seed 2: TextWindow.WriteLine("Enter Angle Seed #2 (0-255):") don2=TextWindow.Read() renk1= MATH.Remainder(don2,256) pw= MATH.Remainder(don2+don1,8) TextWindow.Hide() turtle.X=GraphicsWindow.width/2 turtle.Y=GraphicsWindow.Height/2 GraphicsWindow.Title="Turtle the proce...

Small Basic : Microsoft's Basic Programming Language for everybody

Image
I discovered Small Basic new and I liked very much. It's structure and syntax are very similar to old fashion Basic interpreters like in 80's. You can check the commands and download Small Basic from this links:  Commands: https://smallbasic-publicwebsite.azurewebsites.net/docs/Controls Download:  https://smallbasic-publicwebsite.azurewebsites.net/assets/SmallBasic_v1.2.msi Tutorials and document:  https://smallbasic-publicwebsite.azurewebsites.net/resources I made a small and basic Procedural Drawing program via Small Basic. You can reach the code from Small Basic cloud via >>>  http://smallbasic.com/program/?BFNK818.000 Also I added to end of this article. But if you don't want to struggle the code, you can download the exe file from >>>  https://drive.google.com/file/d/1x5-wN4Icx8iMn_7smzjN1TSwnnSE_raX/view?usp=sharing When you run the program, it asks 2 seed numbers. They must be between 0-255. Then it asks for the length of each step ...