Just think, it could be the next C ;D
But seriously, I'm bored... And I already have a very rough 3d (point) rendering code. Any thoughts on how to get it doing, well, more? (ie lines, polygons, etc) ?
...aand, that is probably 1/6th of the entire script used to generate the pic. Worldgen does a quick mapping from the shorthand v-dub representation to a secondary 'flatland' matrix rep, and then Projectimage does all the work, namely Getxyrot (calculates x & y rotation from [mypos] - heading default to heading [myfix] ), Makeworldxyz turns the flatland to a Nx3 point matrix and translates from default to mypos, Applyxyzrot does the final matrix(-value) rotations, and then projectimage finally wipes off the z-values and returns the 2d points.
So, i'm kind of hoping if all that is do-able (in octave / efficiently), then why not be able to do more?
hmm, i found one way of doing, well something at least, using two (kind of dumb) matrices to store x and y co-ords, and a kernel =)
result : http://img.techpowerup.org/121214/myfade.jpg
that might not sound dumb, but they are storing their own indices, eg mx(1,1) = 1, mx(1,2) = 2 // my(1,1) = 1, my(2,1) = 2, etc..., which seems kind of insane but works nicely, and sure saves looping over all 2500 elements for a tiny 50x50 px image
still chasing a working polygon.. (read: i can't draw triangles properly yet.....) but instead, another lovely graphic (from my old acer // canvas-6 never looked this good !! )
>>19
You have not ``used Octave at work for some machine learning stuff.''
You just watched the two first lessons of Machine Learning in Coursera. Your lie was sweet.
>>20 octave is poor man's matlab
just add QTOctave and then its the same
Name:
Anonymous2012-12-16 4:27
>>24
it's not. I hate the fact that the fsf is interested mostly in replacing non free software instead of offering better alternatives to it. Due to this, free software is usually a couple of steps behind proprietary software.
>>25 I hate the fact that the fsf is interested mostly in replacing non free software instead of offering better alternatives to it. Due to this, free software is usually a couple of steps behind proprietary software.
Its not a couple steps behind or any steps behind. People are ingrained with the corporate mentality that individuals cannot defeat the power of industry. For the most part that is true, an individual cannot design his/her own car, airplane, medicine, washingmachine, or anything and expect it to compete with the full infrastructure of design and production that goes on in a large company. But this is not true with software. Computers are universal, the same computer in your cellphone can (and did) launch rockets that put a man on the moon. Not only is software quality of open source software as good as commercial, it is often better as there are no funding restraints or supervisors who allocate design resources. An open source programmer is open to experiment with things that would never be approved in a commercial environment. For this reason many major software companies give free rein to their programmers to submit ideas. Most major software companies like MS, Apple, HP, Sun started out not as a corporation but just a group of programmers who had an idea for a product. We refer to such small companies now as startups. Companies that lose this startup mentality and use normal corporate heirarchy of design get bogged down and fall behind which is what is happening to MS.
Name:
Anonymous2012-12-16 9:23
>>27 Companies that lose this startup mentality and use normal corporate heirarchy of design get bogged down and fall behind which is what is happening to MS.
Is that why Windows 8 came out with its new shitty Metro interface? I wouldn't be surprised if MS looked at various X11 tiling window managers and used them as "inspiration" to replace the last somewhat sane part of Windows.
Name:
Anonymous2012-12-16 9:47
>>25
If you had to convince a university or a corporation to get rid of Matlab, what would you propose to use as a replacement for Matlab?
It's insane to believe that they would use anything that's not Octave if they actually replaced Matlab with anything. It's practically and logistically impossible to train a bunch of old professors, change the structures of all the courses etc to use something new with reasonable use of resources.
If you had to convince a university or a corporation to get rid of Matlab, what would you propose to use as a replacement for Matlab? http://esolangs.org/wiki/CLCLC-INTERCAL (1) PLEASE STASH ,1
DO ,1 <- .1
DO .1 <- #1
PLEASE REINSTATE (2)
MAYBE NOT .1 <- #0
DO ,1 SUB .2 WHILE ABSTAIN FROM (2)
(2) PLEASE GO BACK
PLEASE DO RETRIEVE ,1
DO GO AHEAD
DO RESUME #1
>>26 I can only hope octave will be able to paint the screen nearly as quickly as this one day soon. Plebian is good though, i'd say the greatest downside of assembly is that it is just too exotic. >>25, 27 Closed source 'should' be a step or two ahead of open source, since there is an open source reference / standard, doing worse than the freely available standard, in theory shouldn't happen..
Anyway, here's my first working polygon script =)
function [atx, atz] = getAngles(pointmat)
p2 = pointmat([2:end,1],:) .- pointmat(1:end,:);
tx = 360.0 .- (atan2(p2(:,1), p2(:,2)) .* (180.0 / pi) .+ 180.0);
tx([2,3,1],2) = mod(tx + 180.0, 360)
zero_broken_angle = (abs(tx(:,1) .- tx(:,2)) < 180)
greaterFirst = tx(zero_broken_angle, 1) > tx(zero_broken_angle, 2)
atx = tx(zero_broken_angle, greaterFirst)
patx = [1:3];
patz = patx(zero_broken_angle);
atz = [patz(greaterFirst), patz(greaterFirst==0)]
if (sum(greaterFirst==0) > 0)
aty(:,[2,1]) = tx(zero_broken_angle, greaterFirst == 0)
endif;
atx = [atx, aty]
endfunction
le bump, mainly because i haven't given up yet...
current progress : http://img.techpowerup.org/121217/nu.jpg
100 (random) polygon test took 12.2sec for 800x800 px (above), 6.4 sec for 600x600, and 1.6 sec for 300x300