Skip to content
Forum Archive

Can't figure out how to make a sphere.

21 posts

*tey#

Can't figure out how to make a sphere.

Anyway, Im a beginner in coding. Haven't released anything either.

So would anyone give some examples of how to make a sphere in DM? Only a sphere. No spinning stuff or moving. Thats up to me to code 🙂 LOL!
*tey#
Now that's exactly what a beginneR like me need. HELLO? ANY AVS CODE EXAMPLES PLZ!!!!!!!!!!!!!!!
Rovastar#
*tey if you are begineer I suggest you start with something easier than creating a sphere in DM. In fact I would suggest not looking seriously at DM at all until you have a good understanding of most of teh other aspects of AVS.
Jaheckelsafar#
Tru dat Rovastar. Despite a sphere being a simple shape there's still a fair amount of code behind it. Best to start small and work your way up. To be honest, I haven't made a sphere with a DM. I know they math, but the DM acts in ways that are beyond me sometimes. I just don't get why it does what it does.

Poke around and work your way up. That's what everyone here did and is still doing.
anubis2003#


Bah.

If you want to learn how to make a sphere search the forums - many a sphere have been made. Search through presets finding ones that have spheres - there's a lot of them. Don't just demand for code for a sphere - figure it out yourself. We can help you but we're not about to just give you the answer - that's no fun for us and doesn't make you any better.
D12#
frame: fr=fr+0.05;speed=0.012+0.005*sin(fr)
beat: fr=fr+0.5;
dir=rand(40)/1000-0.02
pixel: x=if(above(x,0),x-speed,x+speed);y=y+dir

I learned it from AVS masters.
Synth-C#
frame: fr=fr+0.05;
speed=0.012+0.005*sin(fr)
beat: fr=fr+0.5;
dir=rand(40)/1000-0.02
pixel: x=if(above(x,0),x-speed,x+speed);y=y+dir
Thats just defunct code, not a sphere.
sta#
check this out:
:: Dynamic movement ::

-init-
rr=0.5;
-pixel-
d=if(above(d, rr), d, ($PI/2-acos(d/rr))/($PI/2)*rr);
Best viewed with maximum grid size and wrap+billinear filtering on.

does it work?
Warrior of the Light#
Please don't revive dead threads, it has been dead for more than two weeks!

But since it's alive again anyway...
Here's the preset that's been used the most around here - NemoOrange's 'As soft as glass'.


d=if(below(d,.4),(tan(d*3.1459*1.1)*.2),sin(-d*1.8)*1.4)
next time, sort things out yourself.
UnConeD#
You need to use the full reply form rather than the quickreply form at the bottom of the thread.