This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Horrowind
16
« on: August 05, 2011, 07:04:11 am »
well.... my two cents using recursion:
#include "iostream" #include "string" void allwords(string s, int i) { for(char j = 97; j <123; j++) { if(i > 1) allwords(s + j, i-1); else std::cout<<s+j<<'\n'; } } int main(void) { int i = 0; while(1) { allwords("", i); i++; } }
17
« on: August 01, 2011, 01:29:16 pm »
hm... Nf6?!
18
« on: May 31, 2011, 06:58:22 pm »
While messing a bit with the (offical) SDK for the 9860, these two issues happend: First, when opening a file from the SD-Card after initializing grayscale, the screen leaves blank, when you try to swap the buffers and second, reading from SD-Card causes heavy flicker. I tried to make a simple videoplayer, so I simply repeatedly loaded the first 1024 bytes of a file in the first buffer, and the next 1024 in the second buffer and so on.
So the question is: Is there a way to make the grayscale smooth while IO or is there no way to fix it by design of the creation of gray?!
19
« on: May 26, 2011, 03:57:39 am »
as I understand this problem, you have 3 points which are moving with constant speed and now you want to figure out, when they are collinear. Lets say, the points are starting in the vectors a0, b0 and c0 and move along the vectors a b and c so that after time t they are at:
a0+t*a, b0+t*b and c0+t*c
To test for collinearity you can check if the vectors
v1 = b0+t*b - a0+t*a
and
v2 = c0+t*c - a0+t*a
are multiples, so there is a k with v1*k = v2. Now you have these two equations:
(b0x + t*bx - a0x + t*ax) * k = c0x+t*cx - a0x+t*ax (b0y + t*by - a0y + t*ay) * k = c0y+t*cy - a0y+t*ay
which lead to:
(b0x + t*bx - a0x + t*ax) * (c0y+t*cy - a0y+t*ay) = (c0x+t*cx - a0x+t*ax) * (b0y + t*by - a0y + t*ay)
This is a equation of 2. degree, but the terms are becoming huge, I hope if you could follow me up to this point, you are able to solve it.
EDIT: Okay, I assumed linearity here but anything else would be far more complex.
20
« on: May 05, 2011, 03:49:40 pm »
well, were is no need for advanced sin/cos-stuff... one can simply use the area of the triangle: A = (50 * h)/2 = 30*40/2 which leeds to h = 24, if i'm not mistaken
21
« on: April 18, 2011, 11:04:15 am »
well, where is a trick to run any addin in the emulator of the sdk, you can add the addin in the SD-card memory folder and copy it while running another addin from SD-card to flash memory (via System-Menu). Then it can be easily executed in the Main-Memory.
22
« on: March 01, 2011, 03:34:22 pm »
a better aproach for a longtime project would be using an existing infrastructure such as BOINC ( http://boinc.berkeley.edu/) but one would need to work into the API. On the other hand it would be easier on the client side, since there is already an existing client software, which could attract more people. But well, as the chances are very small
23
« on: February 19, 2011, 04:35:06 am »
these there, iirc, for the even older modells (CFX) and could be compared to g1m in function (they store Programs, Pictures, Lists and so on), but on this i'm not sure...
EDIT: also these are not readable from the fx9860G(II) itself, but can be opened from the transferprogram (FA-124)
24
« on: February 19, 2011, 03:41:27 am »
g2* is for the fx-9860GII...
25
« on: February 05, 2011, 03:54:55 pm »
After some experiments i wrote a short bash script for converting an avi file to a cuv file (for the video player). It doesn't have audio support and the used dither is not the best one can think of. It uses ffmpeg, image-magick and bc. In my tests (in the SDK) the audio (played from the original video) gets asynchron, so the framerate is probably wrong * converts Wall-E for viewing it in his Math lessons... #!/bin/sh [ -z ${1} ] && echo "Usage: $(basename $0) <filename>" && exit||filename=${1} duration="$(ffmpeg -i $filename 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,// | cat)"; seconds="$(echo $duration | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }' | sed 's/[,]/./')"; framerate=40; framesd="$(echo "$framerate*$seconds" | bc)"; frames=${framesd%.*} for i in $(seq 0 $frames); do time="$(echo " scale = 3; result = $i/$framerate; if (0 < result && result < 1) { print "0" } print result; " | bc)"; echo $time; ffmpeg -vframes 1 -ss $time -i $filename -f image2 pipe: | convert - -resize 128x64\! -ordered-dither o3x3 pbm:- | sed '1,3d' | cat >> demo.cuv; done;
|