Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


Well advancing on from my cube last time I decided to make myself a tree. After a couple of silly mistakes which I really shouldn't have made I ended up with this:

HMm, it could use a little colour though. That's easy enough, make a linear scale from 0 at the bottom to 1 at the leaves and interpolate between a nice brown and a green.

That's looking a little better now! It could do with a bit of tweaking, the green is coming in a bit too early, but that's all right I can apply a function to the linear scale to get one that has a gradient slow, then fast at the end.

The next step was to increase the feeling of 3D - a nice ground plane would do this nicely:

Looking good!

After that what I plan to do is add grass (maybe) and clean up the code (a lot). Still, it's not bad for a graphics system that only uses straight lines.
Sign in to follow this  


Recommended Comments

Very cool. [smile]
Do you have any way to get pixel coordinates, or can you only deal with the scale the turtle offers?

Share this comment

Link to comment
Well the code I'm provided with takes the LOGO commands and dumps them to a postscript file, so I can scale the postscript output by a single value. Unfortunately if I make the picture too small then the lines become noticably thick (they are a fixed size, so they scale up too). So I need to keep it at a certain level.

Still, it's not too limiting. The main two points that make it usable are the inkless brush and branching. With those two it's easy to make a branch, translate to the beginning of a line, draw the line, then end the branch. That way you can draw any number of lines simply by concatenating the different branches. After that you just need to build up your internal representation of the vertices, and write a function to project it all to 2D lines.

Getting colour in is a bit more hassle, but it's possible :)

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!