[QUOTE=paindoc;52870658][...]
[sp]a lot of this could have been easily avoided if scientists were better about naming their variables, they're brilliant at math and science but using three-letter variables and obsfuscated acronyms is just something they always seem to do![/sp][/QUOTE]
At least in physics, they do seem to be [url=https://en.wikipedia.org/wiki/List_of_common_physics_notations]standardised enough[/url] to use them clearly[URL="https://en.wikipedia.org/w/index.php?title=List_of_common_physics_notations&oldid=807159770"].[/URL]
It's probably a different matter once you have more detailed meanings and can't use greek letters or subscript, though.
[QUOTE=Tamschi;52874449]At least in physics, they do seem to be [url=https://en.wikipedia.org/wiki/List_of_common_physics_notations]standardised enough[/url] to use them clearly[URL="https://en.wikipedia.org/w/index.php?title=List_of_common_physics_notations&oldid=807159770"].[/URL]
It's probably a different matter once you have more detailed meanings and can't use greek letters or subscript, though.[/QUOTE]
Well, yes and no. Things like Mu, A, V, G, etc - yeah, usually. But some people use theta for colatitude and some use phi, and the only real universal in geographic coords is R/r being radial distance (not addressing people using colatitude, others just regular latitude). Lambda seems to be longitude, usually, but someone else used phi for a constant and someone else also used alpha for that constant so it was all a flustercluck. [URL="https://github.com/jacobwilliams/Fortran-Astrodynamics-Toolkit/blob/master/src/geopotential_module.f90"]And in the fortran code i used[/URL], the variables weren't that clear and they did some things others didn't (at least in a different order). Not being able to see that they changed how things were ordered and factored clearly made it harder to understand what was happening.
I'm propagating math and testing the model now though: its accurate enough to catch a 0.06m/s^2 difference in gravitational gradient across 20km's of a tethered craft in low-lunar orbit, so at least it's working. Now to deal with the bit where I keep snapping the tether and turning my singular spacecraft into two spacecraft (oops). Turns out that space tether dynamics are a tough topic.
It'd be nice if you could actually use greek/mathematical characters like π directly without it being a pain in the ass. I've got a compose key set up so I can type them, but I wouldn't really expect anyone else to be able to edit it afterwards :v:.
Plus, chances are that even if your language supports that it's gonna break something horribly anyways.
[editline]10th November 2017[/editline]
Of course the font FP uses doesn't even render lowercase pi correctly.
Not even gonna say how many hours I worked on this. [sp]16[/sp]
[t]https://my.mixtape.moe/exuljg.png[/t]
[url=https://www.shadertoy.com/view/XlByW3]
Space Manta
[/url]
It's a manta ray with light rays in space! Don't entirely like how the manta turned out, but I am horrible at modelling. It's times like these when I wish I could just render a 3d model.
The light rays are generated by integrating over a 3D volume.
The manta is ray-marched.
I've tried a lot of complex things with this one, with many things failing. Originally I wanted the light beams to be obstructed by the manta ray, but that turned out to be too many calculations to do.
I am very proud on how the light beams turned out, especially in combination with the starry background. I need to pimp the background a little bit more though.
I love the ambient sound of fans spinning up louder and louder. Really adds to the piece.
Wrote what I thought was a cool C++ template device for automatically collecting subclasses of a base class. Showed it to my coworkers who immediately shot it down as "over-complicated", "not a real design pattern", and "confusing".
Since I don't really care what they think (:cry:), I thought I'd see what you guys think:
[url]https://github.com/Sidneys1/subclass-registry[/url]
[QUOTE=Tobba;52874677]It'd be nice if you could actually use greek/mathematical characters like π directly without it being a pain in the ass. I've got a compose key set up so I can type them, but I wouldn't really expect anyone else to be able to edit it afterwards :v:.
Plus, chances are that even if your language supports that it's gonna break something horribly anyways.
[editline]10th November 2017[/editline]
Of course the font FP uses doesn't even render lowercase pi correctly.[/QUOTE]
Meh, having to set up shit to type extended characters while coding would be the most annoying shit imo. More work than just typing variable names.
Well, the last exam is over. There's my degree, assuming I didn't fail any.
[editline]10th November 2017[/editline]
[code]DROP TABLE Stress;[/code]
[editline]10th November 2017[/editline]
My Visual Studio editor font size has gone up 3pt since I started the degree four years ago.
I don't even know what to say. I don't like to brag, but I think I have created something that is way more beautiful than I ever could've dreamt to create with shaders.
[t]https://my.mixtape.moe/rqlrwg.png[/t]
[url=https://www.shadertoy.com/view/ltSyDc]Rays in Space[/url]
(Nebula appears after a few seconds, the texture needs to stabilize first)
I made a sound synthesis... thing. It doesnt sound quite right but I'm surprised how close you can get by just adding 20 sine waves together, and I could probably get it way closer if I added a better way to tune the higher periodics.
[vid]https://s3.amazonaws.com/rewind-screenshots/tobba/fa4bb09c-8fc8-4fd2-b972-09bcb2cc2abe.ogg[/vid]
[sp]it's supposed to be a C2 on a bass[/sp]
What ever happened to that one guy's project on here who was developing a speech synthesizer?
[QUOTE=Karmah;52879762]What ever happened to that one guy's project on here who was developing a speech synthesizer?[/QUOTE]
[url]https://github.com/TheBerkin/Sagen[/url]
Oh yeah. He hasn't posted in this thread since August
:mystery:
[QUOTE=DrDevil;52878618]I don't even know what to say. I don't like to brag, but I think I have created something that is way more beautiful than I ever could've dreamt to create with shaders.
[t]https://my.mixtape.moe/rqlrwg.png[/t]
[url=https://www.shadertoy.com/view/ltSyDc]Rays in Space[/url]
(Nebula appears after a few seconds, the texture needs to stabilize first)[/QUOTE]
That nebula shader is weird. I can more or less tell [I]how[/I] it works, but I have no idea [I]why[/I] it works beyond being a repeated sharpen with a [I]very[/I] weird filter kernel.
[QUOTE=Tamschi;52880384]That nebula shader is weird. I can more or less tell [I]how[/I] it works, but I have no idea [I]why[/I] it works beyond being a repeated sharpen with a [I]very[/I] weird filter kernel.[/QUOTE]
I just wonder how much time the guy finding it stared at flickering and unaesthetic outputs before he found this one.
[QUOTE=DrDevil;52880499]I just wonder how much time the guy finding it stared at flickering and unaesthetic outputs before he found this one.[/QUOTE]
I'm not sure. The filter kernel isn't even close to being convergent, but there are some [I]probably[/I] very sensible ideas in there (like perturbing the long-range sampling using the short-range samples, which I think shrinks and distorts the large structure onto itself).
[QUOTE=Tobba;52879433]I made a sound synthesis... thing. It doesnt sound quite right but I'm surprised how close you can get by just adding 20 sine waves together, and I could probably get it way closer if I added a better way to tune the higher periodics.
[vid]https://s3.amazonaws.com/rewind-screenshots/tobba/fa4bb09c-8fc8-4fd2-b972-09bcb2cc2abe.ogg[/vid]
[sp]it's supposed to be a C2 on a bass[/sp][/QUOTE]
Yep, it's called additive synthesis. Are you just following the harmonic series or are there some inharmonic elements too?
[QUOTE=Handsome Matt;52880490]he got a girlfriend :mysterysolved:[/QUOTE]
Development-wise there's some slight ambivalence to this. You just do not have the same time if you have a significant other.
[QUOTE=Handsome Matt;52880490]he got a girlfriend :mysterysolved:[/QUOTE]
I'm taking a mental health break from programming to deal with more pressing issues in my life. But I still read everything here.
[QUOTE=Tamschi;52880543]I'm not sure. The filter kernel isn't even close to being convergent, but there are some [I]probably[/I] very sensible ideas in there (like perturbing the long-range sampling using the short-range samples, which I think shrinks and distorts the large structure onto itself).[/QUOTE]
I think that this non-convergence is exactly what makes this so effective at generating such intricate structures. It just has to be tuned very precisely because it's extremely unstable.
[QUOTE=Ott;52880544]Yep, it's called additive synthesis. Are you just following the harmonic series or are there some inharmonic elements too?[/QUOTE]
It's all harmonics except for the 4th overtone, which is AM modulated by the fundamental at the start; it produces that "springy" sound in the start.
There seems to be some funny things going on when it comes to auditory perception and the harmonics though. I noticed that the 1st to 3rd overtones are somehow special, and only the slope seems to actually matter. Removing one of those overtones on most sounds I tested oddly made pretty little perceivable difference, even though they're the second-loudest set.
That, and it seems the really critical thing is how the 4th+ overtones change over time (i.e the attack, decay and some non-linearness), while their relative amplitude doesn't actually seem to matter as much as you'd expect. It's also the most painful part to get right, so yeah.
a project class of mine has us building a robot with an atmega324 as brain.
then we have to resolve what is basically a travelling salesman problem with it on a graph with 17 nodes.
edit: with C++ but no STL
[vid]https://i.imgur.com/YolVGx0.mp4[/vid]
I got animations working. This "idle" animation only has 5 keyframes and plays at 10 fps. The game is running at 60fps, so it interpolates between the frames linearly.
The top part is me putting in random rotation numbers to see what would happen.
Funfact: When you override the "drawBackground" method of Qt's GraphicsView framework with an opengl viewport you get a free opengl context which you can use to render opengl stuff and then still use the GraphicsView framework on top of that to render Text, graphics and Qt Widgets over your opengl context.
[QUOTE=Tobba;52881368]It's all harmonics except for the 4th overtone, which is AM modulated by the fundamental at the start; it produces that "springy" sound in the start.
There seems to be some funny things going on when it comes to auditory perception and the harmonics though. I noticed that the 1st to 3rd overtones are somehow special, and only the slope seems to actually matter. Removing one of those overtones on most sounds I tested oddly made pretty little perceivable difference, even though they're the second-loudest set.
That, and it seems the really critical thing is how the 4th+ overtones change over time (i.e the attack, decay and some non-linearness), while their relative amplitude doesn't actually seem to matter as much as you'd expect. It's also the most painful part to get right, so yeah.[/QUOTE]
Yeah, you can chop off the first handfull of harmonics and the brain will still be able to tell the pitch. We don't listen for the fundamental harmonic to tell pitch, we listen for the harmonic series as a whole.
god i hate legacy code and C-style C++:
1. everything uses boolean return codes for success/failure. This is a problem when errors aren't handled - instead, failures are written as an error message to a file. So if something fails to import and gets initialized with invalid values, it won't really break until you try to use it. This location in the code can be far removed from the import location, so gl debugging where things break. Enter: exceptions. As if they haven't been around for ages
2. This code has all the variables declared on the first few lines of the program. this can be as many as two dozen (holy fuck) variables. Trying to figure out why things are broken due to a poorly set variable is a bitch when you do this, because you can't use either scope or declaration location ot narrow down the region in which the bug lives. It has cost me a tremendous amount of time.
3. Lots of code is very immutable and tuned for only one situation: when finding the initial tension in the tether joining a tethered spacecraft formation, the code assumed the satellite was orbiting the earth [I]always[/I]. So when I'm testing a lunar orbit, it uses earth constants - including the gravitational force appropriate for the Earth. Despite the orbit (because it's for the moon) being [I]inside the goddamn planet[/I]. So a really high tension value got set, and my tether kept snapping. It took me 3 hours to find out why this was occurring.
I'm constantly putting out little fires caused by the really awful programmer who last touched this codebase, too. My boss/CEO is a scientist, and programs like one: he doesn't do anything crazy, and the worst he does is name variables poorly. This other guy? Just a retarded engineer. He turns what should be a for loop into an if statement checking for some variable, then a do-while iterating over an array where the array index is iterated inside the do-while. Why!?
I enjoy a lot of the satisfying math and logic problems I get to confront. I even enjoy, for the most part, getting to refurbish this application. But jeese, some things really exhaust me and test my patience. Like the awful hungarian notation, which truly obfuscates so much more than it can ever help.
That last one sounds like what a for loop compiles into. I've seen it a lot when reverse engineering code.
[QUOTE='[aL`H]solokiller`og;52885955']That last one sounds like what a for loop compiles into. I've seen it a lot when reverse engineering code.[/QUOTE]
I've been enjoying playing with godbolt lately. One of the neatest things to see is how easily the compiler works with using "std::transform" for overloaded math operators on custom array classes - optimizes to SIMD stuff nearly every time. Although, if you enable SIMD instructions when compiling, most for loops with math inside them will compile down to SIMD stuff. Its just been generally neat seeing how stuff compiles down, and how small changes to the code or compiler arguments can hugely modify the generated assembly.
another thing I dislike: no usage of pure-virtual methods. Instead, it just prints an error saying "hah lol you shouldn't be here!" (effectively). Nothing is marked override or final. There are calls to derived functions in the base classes constructor.
oh, and the base class has 70+ member variables, each prefixed with dm_, of course. and the constructor takes 28 arguments. And doesn't use direct initialization, either.
This code makes me sad :(
[editline]edited[/editline]
like, some of the stuff I've mentioned is so bad that it makes my good friend working on Excel feel like legacy Excel is in great shape
wtf :scream:
Fuck constructors / initializers in C++ in general. It gets insanely out of hand without designated initializers or initializer lists that can deal with move semantics.
Someone please tell me there's a better way to do it than having to write out every member name 3 fucking times in the constructor with std::move sprinkled in all over the place.
[editline]13th November 2017[/editline]
My code has a 685 character constructor for a 12 member class. I started putting them all on a single lines because I got tired of scrolling past them. Send help.
Another quick one, only took me one hour. Looks a bit shite though, but I gotta go to bed.
[t]https://my.mixtape.moe/rwmwzz.png[/t]
[url=https://www.shadertoy.com/view/Xt2cDt]Laserworld[/url]
Sorry, you need to Log In to post a reply to this thread.