Computer Science Canada Parametric Equations (interesting 3d addition) |
Author: | lapo3399 [ Fri Jul 14, 2006 7:11 pm ] | ||||||
Post subject: | Parametric Equations (interesting 3d addition) | ||||||
I love math. Therefore, I love anything that has to do with math. For me, algebra/graphing of parametric equations comes only second to calculus. Not only can these equations allow a programmer to let an object follow any path, they are also good for visual effects. Now that I am done my small monologue, I just want to present a few interesting parametric designs that I have tried and may be useful (or just fun to watch). Most of them do not use offscreenonly, because it is unnecessary - most of them do not use Draw.Cls, because of esthetic reasons. First: A full rotation of hyperbolic spirals branching inward to (maxx div 2, maxy div 2), then branching outward in a different colour.
Second: A bunch of colourful expanding and contracting Golden Curves, which run for 26 cycles before stopping.
Finally: A bunch of ovals following the path of a bunch of eight curves (basically figure 8's), all in different colours. Gives the illusion of a line of changing orientation and length. The only visible difference is that the origin of the line is also following an eight curve.
You can make these pretty quickly, and out of almost any relation with a parametric form. It's probably pretty obvious what I did to most of you, because it's not complex code and you've probably already used parametric graphing before. I just thought it was interesting to try and make patterns with parametric equations for once. |
Author: | lapo3399 [ Fri Jul 14, 2006 8:05 pm ] | ||
Post subject: | |||
I just discovered an interesting 3d property with this .... movement of an array of ovals of changing size.... looks like the cone is sticking out at you. This program could be modified for any number of these 3d surfaces, to follow any parametric curve, to be any height, and to have the shape (change in oval diameter) of any curve revolved around it's central axis.
|
Author: | lapo3399 [ Fri Jul 14, 2006 10:10 pm ] | ||||
Post subject: | |||||
Here is an even further improvement to the 3d system, using rgb and borders to simulate depth, and a point that follows the mouse:
And a change in shape:
|
Author: | Windsurfer [ Sun Jul 16, 2006 11:26 am ] |
Post subject: | Nice |
Very nice, simple effects! I like it very much. Keep up the good work. Maybe a tutorial could come out of this? +25 bits |
Author: | Delos [ Sun Jul 16, 2006 11:46 am ] | ||||
Post subject: | |||||
Tutorial - I'm not too sure about that. Sure this is a nifty application of some Gr12 maths, but otherwise it's just pretty pictures. Which, by the way, aren't 3D ! They're, uh, pseudo-3D... Anyhow, I do like this, but I would like it even more if I saw less repitition in your code!
Why!? Make a simple function that will accept a couple of necassary paramters and you'll find your life so, so much easier. Also, your code will be more meaningful. To wit:
Suddenly the code is no longer simply maths, but maths that speaks to you! +bits for preempting a manipulation I was going to suggest after having seen the first example. (Using shades of grey to emulate the 3rd dimension).[/code] |
Author: | lapo3399 [ Sun Jul 16, 2006 6:54 pm ] |
Post subject: | |
Thanks for the interest. I was planning on making something along the lines of what you talked about, Delos. Allowing the user to input parameters would be an interesting feature as well... the non-pseudo-3d stuff would be interesting for plotting non-functional relations as well in a graphing program, as long as one had a polarization/parametrization (or if not, simply use y and x as functions of i, with x:=i and y:= Cartesian function with i subbed in for x). Also, the pseudo-3d stuff would be interesting for plotting solids of revolution.... hmmm... And, not that I'm trying to invoke any kind of argument here, but imo the term pseudo-3d as applied to certain computer-generated 3d scenes is most certainly incorrect, at least in a linguistic (in terms of the term) and physical (in terms of the science) sense. Although "true" 3d graphics use a different method for displaying a 3-dimensional scene, they in truth are not 3 dimensional. Even stereoscopy does not produce true 3-dimensional space - the effect is because of the natural processes that occur in our brains. Therefore, if the laws of language and physic were to be obeyed, then the term for all CG 3D environments would be pseudo-3d. After all, pseudo is Greek for "false." There, I've finished my monologue (I find the word "rant" disturbing*, for some reason it reminds me of walruses**). * I am eccentric (very). ** For some reason (maybe my love for Latin and Greek) it's always seemed to me that the word walrus should actually be pluralized walri. Visit footnote 1 for another reason why I may think this. |
Author: | Delos [ Sun Jul 16, 2006 9:39 pm ] |
Post subject: | |
Hmm...I'm starting to get worried here. I was actually going to present that very argument myself as I was discussing the nature of pseudo-3dness. Ah well, that just means I get to run the rebuttal! Wheeeee! We are speaking conxtually - never forget that. Since you chose to bring in linguistics, I'm afraid I'll have to pull out my trusty psycholinguistics and use that in this discussion. Since it's contextual now. This is a forum about CompSci, and unless otherwise indicated, discussion in at the very least this particular thread is CompSci related. This is the basis of the context I spoke of. Hence, my reference to 'pseudo-3Dness' meant that it was not actually a 3D-engine of sorts, as it only incorporated 2 dimensions of analysis. Sure all 3D engines produce 2D projections, but that's entirely besides the point. I used the term 'pseudo-' meaning 'not quite the real thing'. This is its modern anglasisation, derived from Greek. It is also a bit of a colloquiolism too - though in a very, very broad sense.... And if you know any linguistic terminology, that joke will be quite funny indeed. Otherwise, simply nod and smile. Now, if you're going to start talking about what happens in our brains, I'm afraid you'll have to take two or three steps back. Nay, make that twelve or thirteen. I'll just accept your point and not prolong the debate, mostly because I want to go and sleep just now. Suffice it to say that upper-cortical processing primarily in the occiptal and frontal lobes result in the concious perception of shape and dimension, regardless of fallacious lower sensory input. Anyhow, get to work on those procs/fcns. Things are so much prettier with them! |
Author: | lapo3399 [ Sun Jul 16, 2006 10:37 pm ] |
Post subject: | |
It seems as though I've always been one step ahead of you in this thread.I don't know exactly what's happening, but I'm pretty sure it's somewhere between me reading your mind and my eccentricities* getting the better of me. *If you immediately thought of orbital mechanics then you are my new best friend... |
Author: | [Gandalf] [ Mon Jul 17, 2006 2:21 am ] |
Post subject: | |
But... but... Delos is supposed to be the clairvoyant one! Anyway, that's some pretty amazing stuff you've done there. Good job. |
Author: | Delos [ Mon Jul 17, 2006 9:36 am ] |
Post subject: | |
Gandalf, Gandalf. Er, I mean, [Gandalf], [Gandalf]...Do you not read/listen always? lapo clearly said lapo wrote: It seems... And I mentioned several times how I had the same line of thought as he, just I did not bother delving into it. Question not my clairvoyence, partial though it may be. Otherwise I might just make you drop that sandwich later on . |
Author: | NikG [ Tue Jul 18, 2006 9:25 pm ] | ||
Post subject: | |||
Delos wrote: Otherwise I might just make you drop that sandwich later on . Whoa Delos... did you just make me drop mine??
haha Great effects lapo3399. I particularly like the colorfully cone and your last code snippet. +bits Edit: hmm... I noticed something in a few of your sinppets... why is it that you commonly declare the x/y variables as arrays when you only use them once in your loops?
|
Author: | the_short1 [ Fri Jul 28, 2006 10:23 pm ] |
Post subject: | |
Hey matt.. . sure enuf some crazy math enhanced visuals in turing.. great stuff Woulnt beleive this kid is gr11! +Bits |
Author: | TokenHerbz [ Wed Aug 02, 2006 11:10 pm ] |
Post subject: | |
I LIKE I LIKE I LIKE!!!! Neat little things |