Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Recursive Landscape Project
Index -> Programming, Turing -> Turing Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TripleBla




PostPosted: Wed Jun 04, 2008 9:49 am   Post subject: Recursive Landscape Project

Yeah, this is a recursive landscape I had to do for a project in my compsci 12 class.

I can't get randint out of my mind!!



Landscape.zip
 Description:
Hurrahh!

Download
 Filename:  Landscape.zip
 Filesize:  273.05 KB
 Downloaded:  246 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
apomb




PostPosted: Wed Jun 04, 2008 9:59 am   Post subject: RE:Recursive Landscape Project

Very Crisp.
A little more colour would be nice.
you used randint? NOOO lol Rand.Int() is the way to go... i think

gj though, bits++
petree08




PostPosted: Wed Jun 04, 2008 10:00 am   Post subject: RE:Recursive Landscape Project

what happened to santa?
TripleBla




PostPosted: Wed Jun 04, 2008 10:01 am   Post subject: Re: Recursive Landscape Project

lol, sorry .. yeah, Rand.Int (*,*) .. is the way to go .. and the way I did go.

In terms of the colour thing, we were given choices for sceneries .. I chose a slightly poetical, wintry, landscape Rolling Eyes lol.
apomb




PostPosted: Wed Jun 04, 2008 10:02 am   Post subject: RE:Recursive Landscape Project

Ha ha nice then. +3 more bits to round it off to an even 20.
petree08




PostPosted: Wed Jun 04, 2008 10:11 am   Post subject: Re: Recursive Landscape Project

here is the start of mine, i'm going to do a daytime one and add rain later

i think James has the best one... poor kelvin

i'll get james to post his

ne way

nighttime recursive landscape, the trees and hills are funny but it's a start



tree.zip
 Description:

Download
 Filename:  tree.zip
 Filesize:  271.59 KB
 Downloaded:  161 Time(s)

TripleBla




PostPosted: Wed Jun 04, 2008 10:14 am   Post subject: RE:Recursive Landscape Project

just wait till James' posts his landscape..

Shading on shrubbery based on position according to randomized sun placement..

.. it's something you have to see to believe.
petree08




PostPosted: Wed Jun 04, 2008 10:17 am   Post subject: RE:Recursive Landscape Project

i want to see kelvin's


code:


put "tree"
put "hill"
put "sky"
if
if
if
if
if
if
if
if
if
end if
end if
end if
end if
end if

Sponsor
Sponsor
Sponsor
sponsor
petree08




PostPosted: Fri Jun 06, 2008 8:08 am   Post subject: Re: Recursive Landscape Project

i got mine finished

inludes

- winter/summer
- grass
-rain/snow
-day/night

-grass
- shrubs
- 2 different trees
- moon is recursive



Compsci Landscape.zip
 Description:

Download
 Filename:  Compsci Landscape.zip
 Filesize:  277.87 KB
 Downloaded:  159 Time(s)

Insectoid




PostPosted: Fri Jun 06, 2008 8:16 am   Post subject: RE:Recursive Landscape Project

Sweet! love the trees triplebla! insane! And this was drawn entirely in turing?
DarkFrogFTW




PostPosted: Fri Jun 06, 2008 8:28 pm   Post subject: Re: Recursive Landscape Project

Alright, here goes. This would be my landscape project.

What this has:

Clouds.
Trees, with leaf shading based on draw angle and sun position.
Randomly positioned sun, horizon, and sky hues.
A back, a middle, and a front, each with different sizes of trees.

what this does not have, but might have soon:

Proper branch shading (I'm still doing it based on position, which only works if its upright or angled away)
Proper cloud shading (see the rays the sun gives? the cloud will reflect the colour that hits the center of the circle along the edge, hopefully giving that effect where the clouds at sunset horizon are reddish looking at the edges.)
Rain (I did do it, but it's woefully inefficient, and as of yet I don't have a big, dark rain cloud in the foreground.)
Another type of tree
A gradiant sun
A flower to make my foreground prettier

And any other feasible ideas you people can throw at me.
Press a key after the landscape is done drawing to make it give another, or press esc to exit.



landscape.zip
 Description:

Download
 Filename:  landscape.zip
 Filesize:  340.75 KB
 Downloaded:  174 Time(s)

gitoxa




PostPosted: Fri Jun 06, 2008 9:08 pm   Post subject: RE:Recursive Landscape Project

Wow, that's amazing James.
Peter, yours is pretty good too, but it seems rather slow at updating the screen. Might be just my computer, but whatever.
[Gandalf]




PostPosted: Fri Jun 06, 2008 10:57 pm   Post subject: Re: Recursive Landscape Project

Wow, these are pretty amazing, I've never seen such artistic recursion trees, though then again I haven't looked too much. Here are some screenshots:

TripleBlah's:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

DarkFrogFTW's:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

+20 bits for both of you.
TripleBla




PostPosted: Thu Jun 12, 2008 8:17 am   Post subject: RE:Recursive Landscape Project

Here's the code for a coniferous tree I wrote.

code:

proc branch2 (x, y, len, nsegs, angle, achange : int)


    var x2, y2 : int
    var BRandom1, BRandom2 : int
    const PINENEEDLELENGTH := 35 + Rand.Int (0, 5)

    x2 := x + round (cosd (angle) * len)
    y2 := y + round (sind (angle) * len)

    if nsegs < 7 then
        Draw.ThickLine (x, y, x2, y2, 2, 160)
    end if

    if nsegs < 8 then
        if nsegs = 7 or nsegs = 6 then
            for i : -25 .. 25
                if Rand.Int (0, 3) not= 1 then
                    drawline (x, y + 30, round (x + sin (180 - i) * (PINENEEDLELENGTH - Rand.Int (5, 15))), y + round (cosd (180 - i) * (PINENEEDLELENGTH - Rand.Int (1, 3))), Rand.Int (115, 122))
                else
                    drawline (x, y + 30, round (x + sin (180 - i) * (PINENEEDLELENGTH - Rand.Int (5, 15))), y + round (cosd (180 - i) * (PINENEEDLELENGTH - Rand.Int (1, 3))), Rand.Int (29, 31))
                end if
            end for
        end if
        for i : -45 .. 45
            if Rand.Int (0, 3) not= 1 then
                drawline (x, y, round (x + sin (180 - i) * (PINENEEDLELENGTH - Rand.Int (1, 3))), y + round (cosd (180 - i) * (PINENEEDLELENGTH - Rand.Int (1, 3))), Rand.Int (115, 122))
            else
                drawline (x, y, round (x + sin (180 - i) * (PINENEEDLELENGTH - Rand.Int (1, 3))), y + round (cosd (180 - i) * (PINENEEDLELENGTH - Rand.Int (1, 3))), Rand.Int (29, 31))
            end if
        end for
    end if

    View.Update
    if nsegs > 1 then
        branch2 (x2, y2, len, nsegs - 1, angle + (achange), achange)
        branch2 (x2, y2, len, nsegs - 1, angle - (achange), achange)
    end if

    if Rand.Int (0, 5) = 1 then
        if nsegs = 8 then
            Draw.FillStar (x - 13, y - 7, x + 15, y + 15, 44)
        end if
    end if

end branch2
Aziz




PostPosted: Thu Jun 12, 2008 8:41 am   Post subject: RE:Recursive Landscape Project

Nice work guys Smile
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 19 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: