minxomat Posted January 3, 2014 Share Posted January 3, 2014 (edited) Hi there. This script is an implicit function plotter, plotting a graph that simulates a landscape. Basically, everything you see in this picture is based on implicit equations and functions. I modified the original equations a bit and added animation for the sea, a moving sun and two different kinds of lighting. Procedural Scene (only per-pixel-colors are calculated, no drawing function is used) Animated sea waves Animated sun Ambient light Directional light The animation has 60 Frames and runs @30FPS. The animation must be pre-buffered due the massive calculations done for every pixel, this takes approximately 5 minutes (get a coffee ). Here are the equations I used in the final version (don't change anythin in the script, except you want to redo all the math): Tree trunks: Light leaves: Dark leaves: Ground: Water: The Sun: Movement of the Sun: Calculation of the RGB values: If you really can't wait 5 minutes for the animation to calculate, here is a GIF (rendered with GDI+): Have fun LandScape.au3 Edited January 3, 2014 by minx DatMCEyeBall, BinaryBrother, mLipok and 1 other 4 I will answer every single PM, and you are free to ask anything anytime. Link to comment Share on other sites More sharing options...
coffeeturtle Posted January 4, 2014 Share Posted January 4, 2014 Thank you, minx for this excellent example! Very well done! This could also be a good teaching tool and inspire interest in higher mathematics! Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted January 4, 2014 Share Posted January 4, 2014 I'm more interested in the script you used to render the .gif. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
minxomat Posted January 5, 2014 Author Share Posted January 5, 2014 A bit more math. (Well, not too complicated math). The color of the sun and the sky are now calculated, too. As well as the effect of the redness of the sun on the whole scene. I attached the script. (I can add the formulas if anyone is interested). landscape.au3 I will answer every single PM, and you are free to ask anything anytime. Link to comment Share on other sites More sharing options...
Lakes Posted January 6, 2014 Share Posted January 6, 2014 Heh, the gif animation reminded me of this. 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted January 19, 2014 Share Posted January 19, 2014 (edited) I re-wrote the frame drawing code (the "heavy" math path) in C++ and compiled it to .dll -- attached below, source included. It takes about 10 seconds to render all the frames. It kinda tells you how slow the AutoIt interpreter is. Could you post the code you used to render the .gif file? Landscape .dll ver.7z Edited January 23, 2014 by DatMCEyeBall "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted January 23, 2014 Share Posted January 23, 2014 (edited) Updated the script above using static linking (you don't need the Visual C++ Redist) and with the "_xp" tools (can run on win XP(for all you old people)) Edited January 23, 2014 by DatMCEyeBall "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now