Hey 🙂
I have searched the forums and i came up with several presets containing code to make a sphere...None of them was too great so i was wondering if you can tell me the simplest way to make one 🙂 I`ve seen movements that create a sphere from a simple scope and scopes recreating the effect but i didnt like it.You need pi in the ecuation right ?
3d sphere
22 posts
The easiest way to create a sphere is to create a spiral on the xz plane, but have the y variable change from -r to r. This will create the sphere that looks like a coil that starts small at the top, gets big in the middle, and gets small again at the bottom.
If you make a spiral like that, you should have an equal spread across the surface, not have the y var increase linearly.
parameterization for a sphere:
x=sin(theta)*sin(phi);
y=cos(theta)*sin(phi);
z=cos(phi);
where theta and phi are angles. this gives you a point on the sphere, gravitating towards two poles...anyone know of any way to make a randomly-generated point sphere that doesn't do this?
x=sin(theta)*sin(phi);
y=cos(theta)*sin(phi);
z=cos(phi);
where theta and phi are angles. this gives you a point on the sphere, gravitating towards two poles...anyone know of any way to make a randomly-generated point sphere that doesn't do this?
Create a 3D box of points, then normalize each one to the radius required.
Thanks for your ideas...Im working on a scope right now to make a 3d sphere that moves...I believe it will replace a dm with success 🙂 Now another small question : is theta recognised by AVS ? i saw a preset with theta and it had no value in init or anywhere else...
No its not recognized by avs. Are you sure it wasn't used in x=... or y=...? Variables don't have to be initialized - they default to zero.
It was in x=... I`ll try to look it up in my preset library hehe.Except x,y,d,r and all that crap are there some other variables avs have incorporated ?
Search the forums. This has been adressed. Probably somewhere in the FAQ. Also, look below the per pixel box. It tells you all of the variables there.
I have that forum thread with variables saved 🙂 I meant unknown variables as in easter eggs or hidden in the code...like pi(i hope avs would contain it...writing pi=acos(-1) everytime is boring).
No, there are no easter egg variables in AVS. They didn't document a couple of functions, though. atan2(x,y) and another one(can't remember what it is). These have also been mentioned in the forums. Use the search feature.
the other one is:
exp(var)::e^var
as in the inverse of:
log(var)::ln var
exp(var)::e^var
as in the inverse of:
log(var)::ln var
Thanks Atero. I'd forgotten that one as I never use it(or log for that matter).
Something that is stupidly missing though is a Base X log of Y function. They should implement a Log2(x,y) that should be is the same as: Log Y / Log X
Zevensoft, there's no point in that really, because your CPU calculates it exactly the same way. An x86 cpu can only take base-2 logarithms.
Any other logarithm is calculated as log2(y) / log2(x).
Any other logarithm is calculated as log2(y) / log2(x).
Thanks for your tips...Im working on a superscope trying to recreate a sphere 🙂 I want to make a big big one change into dots and make it move.I`ve seen it several times and its amazing how it goes 🙂 Btw...does AVS have any easter eggs at all ?
No, just two functions that aren't documented - atan2(x,y) and exp(x).
I dont know who made this, but it was on my comp... maybe it could help?
Thanks for the file but i already have it 🙂 Im trying to figure it out and i dont understand why the creator used such big numbers when i modified the preset and it work with smaller numbers too...
He used bigger numbers to create a better random number generator.
Now that i think about it.. I think it was made by UnConeD but im not 100% sure.. actually i'm not sure at all, but I get this feeling it was.
I'm not saying im physcic or anything..
I'm not saying im physcic or anything..
Yeah, that was UnConed.