|
Usagi-Sauce posted:goddamn i think an attiny85 is 1 gpio line short for this job maybe combine 2 and 3 with a pot? the tiny85 has enough adc channels, so you can have both the supply voltage and the brightness. maybe have the adc reading as less than x means off, and x-max for brightness
|
# ? Dec 14, 2013 11:24 |
|
|
# ? Apr 27, 2024 14:31 |
|
shift register? idk im bad at this tuff
|
# ? Dec 14, 2013 12:54 |
|
BlackTie posted:maybe combine 2 and 3 with a pot? the tiny85 has enough adc channels, so you can have both the supply voltage and the brightness. maybe have the adc reading as less than x means off, and x-max for brightness i don't much like pots in my digital electronics but that makes me think it'd be cool if i could fit a rotary encoder instead of the two buttons, it'd mean finer brightness steps & being able to select them more smoothly, and Base Emitter's suggestion means i've got enough pins gotta do my reading though, it looks like i'd need to keep it powered when idling and i don't really want to invent a booklight that drains its battery in standby peepsalot posted:i did a really simple 3d random walk thing that looks kinda cool
|
# ? Dec 14, 2013 13:20 |
|
peepsalot posted:i did a really simple 3d random walk thing that looks kinda cool i just made it walk in a sphere instead for fun and jesus christ math is a nightmare in js code:
|
# ? Dec 14, 2013 17:17 |
|
Corla Plankun posted:i just made it walk in a sphere instead for fun and jesus christ math is a nightmare in js that's going to gently caress up really badly surely? why not precalc Math.pow(x,2), Math.sqrt(Math.pow(x,2)) etc and your calculations will then magically un-gently caress themselves? or am i missing something
|
# ? Dec 14, 2013 17:31 |
|
i mean your calculations are going to gently caress each other as they happen due to x, y, changing. why not do this?code:
|
# ? Dec 14, 2013 17:35 |
|
hahahaha yeah i dont know anything about javascript and i just woke up and didnt want to scroll up to see how to initialize variables but thank you for pointing out how dumb i am in such a polite way
|
# ? Dec 14, 2013 17:39 |
|
you are most welcombe
|
# ? Dec 14, 2013 17:53 |
|
Corla Plankun posted:i just made it walk in a sphere instead for fun and jesus christ math is a nightmare in js why in gods name are you not using a vector maths library code:
|
# ? Dec 14, 2013 17:58 |
|
btw have a play with unity3d if you get a chance. it's free, can be scripted in js, and idiotproofs whatever stuff you don't want to have to deal with
|
# ? Dec 14, 2013 18:03 |
|
coffeetable posted:why in gods name are you not using a vector maths library nice!
|
# ? Dec 14, 2013 18:12 |
|
have you not come across vector maths or linear algebra before? cause if you plan on doing a fair bit of work involvin well, objects in space, it's hella useful. best self-teachin resource is stroud's Engineering Mathematics, on account of it also being the best all-round maths textbook ever written.
|
# ? Dec 14, 2013 18:41 |
|
linear algebra best algebra
|
# ? Dec 14, 2013 18:47 |
|
Base Emitter posted:linear algebra best algebra 4 reals
|
# ? Dec 14, 2013 18:53 |
|
coffeetable posted:have you not come across vector maths or linear algebra before? cause if you plan on doing a fair bit of work involvin well, objects in space, it's hella useful. i'm actually an engineer (which is why my code was so balls) so i use that stuff all the time, its real cool that there is a library for it though edit: that book is loving amazing. that's like 36 credit hours of math in one tome! Corla Plankun fucked around with this message at 19:31 on Dec 14, 2013 |
# ? Dec 14, 2013 19:27 |
|
Corla Plankun posted:i'm actually an engineer (which is why my code was so balls) so i use that stuff all the time, its real cool that there is a library for it though if you find yourself thinking this while working in a common problem domain, there will almost certainly be a library Corla Plankun posted:edit: that book is loving amazing. that's like 36 credit hours of math in one tome! there's also a sequel, Advanced Engineering Mathematics, which picks up where the first leaves off and takes you through to vector calculus + complex analysis. owns owns owns
|
# ? Dec 14, 2013 19:49 |
|
i added color cycling http://jsfiddle.net/x84T7/11/embedded/result/
|
# ? Dec 14, 2013 22:34 |
|
continuous walk: http://jsfiddle.net/x84T7/12/embedded/result/
|
# ? Dec 14, 2013 23:03 |
|
this is neat but man looking at it is making me sick
|
# ? Dec 14, 2013 23:39 |
|
DEHUMANIZE YOURSELF AND FACE TO SWEET GFX
|
# ? Dec 14, 2013 23:47 |
|
v neat but pro tip about the color cycling, it's best to restrict your cycling to two components of the color. looks a lot better. eg keep the blue component at 0, randomize the r and g between 100 and 255, and you now just cycle in the red-orange-yellow segment of the wheel and it looks cleaner. or do red and blue for pink/purble/magenta stuff, etc.
|
# ? Dec 14, 2013 23:53 |
|
Werthog 95 posted:visit ur local library and find an electronics book i guess?? if u got a college nearby check out an old intro 2 EE textbook what about "getting started in electronics" which everyone of a certain age got from radio shack and has smiley faces on the electrons?
|
# ? Dec 15, 2013 00:09 |
|
is that one of the forrest mims books? they're pretty good dude is kind of like orson scott card in that he's an insane christian wacko, in this case believes stuff like ebola is a genetically engineerd virus created by the cia and global warming is a myth (he teaches these views at some unaccredited university) but as long as you stick to the areas he's not insane (electronics) he's alright
|
# ? Dec 15, 2013 00:15 |
|
coffeetable posted:have you not come across vector maths or linear algebra before? cause if you plan on doing a fair bit of work involvin well, objects in space, it's hella useful. geometric algebra is better objectively but noone uses it ;_;
|
# ? Dec 15, 2013 00:15 |
|
Sagebrush posted:is that one of the forrest mims books? they're pretty good yeah its mims and yeah hes a nut, he got fired from sciam for it (i think it was sciam anyway) but smiley face electrons
|
# ? Dec 15, 2013 00:30 |
|
Sagebrush posted:v neat but pro tip about the color cycling, it's best to restrict your cycling to two components of the color. looks a lot better. eg keep the blue component at 0, randomize the r and g between 100 and 255, and you now just cycle in the red-orange-yellow segment of the wheel and it looks cleaner. or do red and blue for pink/purble/magenta stuff, etc. heres one with just cycling through 1d of spectrum with colors locked in 3phase relative to eachother. http://jsfiddle.net/x84T7/13/
|
# ? Dec 15, 2013 00:35 |
|
Dr. Honked posted:4 reals heh
|
# ? Dec 15, 2013 01:23 |
|
Corla Plankun posted:i just made it walk in a sphere instead for fun and jesus christ math is a nightmare in js var pow = Math.pow, sqrt = Math.sqrt;
|
# ? Dec 15, 2013 01:38 |
|
Mr Dog posted:heh heeeeh
|
# ? Dec 15, 2013 02:02 |
|
Sagebrush posted:is that one of the forrest mims books? they're pretty good oh drat i did not know that poo poo. should have assumed, now that i think about it
|
# ? Dec 15, 2013 02:04 |
|
Malcolm XML posted:geometric algebra is better objectively but noone uses it ;_; not gonna disagree. i found diff geo a right pain until i ran into forms via mtw and oh my god its full of stars but yeah if wishes were fishes. right now i just want the roll-your-own approach to be stomped out, and seein as linear algebra is what 98% of physics-related libraries use, that's the recommendation
|
# ? Dec 15, 2013 03:19 |
|
see also: $functional_lang is objectively better than $lang but noone uses it ;_;
|
# ? Dec 15, 2013 03:20 |
|
Base Emitter posted:linear algebra best algebra
|
# ? Dec 15, 2013 03:51 |
|
kill you'reself op
|
# ? Dec 15, 2013 04:16 |
|
There Will Be Penalty posted:var pow = Math.pow, sqrt = Math.sqrt; with (Math) { var y = sqrt(x) } don't take my word for it though, i'm on me phone and can't test it (who ever uses the with statement anyway?)
|
# ? Dec 15, 2013 13:23 |
|
Malcolm XML posted:geometric algebra is better objectively but noone uses it ;_; I studied a bit of Clifford algebras years ago and I had no idea there were people using it in computer graphics. besides quaternions I mean unless what you're saying is that there are not
|
# ? Dec 15, 2013 15:23 |
|
Just got that book trig mentioned. It's fuckin awesome, already gave me some more ideas about what to do with all these piezos i bought when i decided i wanted to sample a dying hard disk.
|
# ? Dec 15, 2013 18:40 |
|
enotnert posted:Just got that book trig mentioned. thats a real cool idea
|
# ? Dec 15, 2013 19:27 |
|
Symbolic Butt posted:there are not afaik, at least.
|
# ? Dec 15, 2013 20:02 |
|
|
# ? Apr 27, 2024 14:31 |
|
Corla Plankun posted:thats a real cool idea https://vine.co/v/h2AuPjel3qQ I have this one in my office right now that I've had plugged up for days waiting for the rhythm to change.
|
# ? Dec 15, 2013 20:11 |