Hacker News new | past | comments | ask | show | jobs | submit | Voltage's comments login

Given my interest in games and demos, I feel the opposite. I'm always in search of the real-time method that looks plausible and can cover huge areas in 3d space.

Computational accuracy is not important to me at all.


Yeah the demoscene jumps out as a good candidate to represent "creative 'useless' programs". :)

I make a few demos, but my personal favourite was this 4k (windows executable less than 4096 bytes):

https://www.youtube.com/watch?v=sBcwQCBpEiE

It uses all the fancy compressing linker tech (called crinkler) along with a tiny music player and a glsl raymarcher.

I tried to download it but all I get is virus warnings now... I guess malware devs also like crinkler. :(



1) Can build to web mobile 2) Editor for the art team


A big smiley face. :)

    uniform float time;
    varying vec2 vUv;

    // https://iquilezles.org/articles/distfunctions2d/ (Thanks IQ!)
    float sdRing( in vec2 p, in vec2 n, in float r, float th )
    {
        p.x = abs(p.x);
   
        p = mat2x2(n.x,n.y,-n.y,n.x)*p;

        return max( abs(length(p)-r)-th*0.5,
                length(vec2(p.x,max(0.0,abs(r-p.y)-th*0.5)))*sign(p.x) );
    }

    void main() {

        // create coordinates at visual centre (y coords doubled for circles)
        vec2 centre = vec2(0.25, 0.25);        
        vec2 uv = vUv * vec2(1.0, 0.5) - centre;

        // mirror x to get both eyes for the price of one, and find eye offset
        float eyes = length(vec2(abs(uv.x), uv.y) - vec2(0.035, 0.03));
        // carve them out using smoothstep
        eyes = smoothstep(0.015, 0.016, eyes);

        float mouth = sdRing(vec2(uv.x, -uv.y + 0.03), vec2(7), 0.65, 0.1);
        mouth = smoothstep(0.02, 0.025, mouth);

        float shade = min(eyes, mouth);
    
        vec3 yellow = vec3(0.9, 0.7, 0.0);
        vec3 color = shade * yellow;

        gl_FragColor = vec4(color, 1.0);
    }


Great article! I didn't know about Rotation Minimizing Frames or the double reflection method.

I've run up against the issue of unexpected twisting of splines at work more than once.


They're also known as Frenet frames, or Bishop frames, if you're going to dig into them in the future.


Thanks for the tip.

I thought I recognized your handle! You wrote the "A Primer on Bézier Curves" article. Thanks for providing that amazing resource, it's been invaluable during my learning process.


I did indeed, always nice to hear folks enjoyed it!


Frenet frames are simply any orthonormal frame. A rotation-minimizing frame is a frame that has minimal twist from some previous frame.


What they are, and what people call things, are two different things though. Ran into lots of folks calling them Frenet frames while looking this up myself several years ago.


As an Australian, is the best approach to encrypt all my storage and communications? Is that even possible when the potential threat is the government?


This is always the best approach. It's not like you need to make it perfect and unbreakable, just annoying enough to get in to relative to the value of doing so.


I wholeheartedly disagree with this assessment of Apple. As a long time business owner and developer, I've had nothing but pain as a developer working with Apple technologies.

We've created over 100 cross platform experiences, and I'm seriously considering a #FckApple tattoo.


I know that feeling. I was going to write a post about how Apple's review process made us change our how business because we couldn't afford to fight with them even when we are in the right.


Counter point: Often I am faced with doing it right or doing it within budget for an activation that is designed to live for a few weeks only. I aim for 100% compatibility with different hardware, OS, browser, user experience, client expectation and non suicidal business practices.


"Satan should chair your meetings"

...

She already does.


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: