Posts

Showing posts with the label graphics

UniChrome Pro on Ubuntu via OpenChrome

It worked easily with the VESA driver, however the legacy mode tables don't have any of today's fancy aspect ratios. OpenChrome, the default driver, just gave a blank screen. Reviewing Xorg.log revealed an abort by signal 11, segmentation fault (segfault). Let me share the process of fixing it. I went on to generate a new xorg.conf for editing by Xorg -config xorg.conf.new . I then proceeded to add as much fail-safe options as possible from the driver documentation : Section "Device" Option "ModeSwitchMethod" "legacy" # or blank & segfault Option "SWCursor" "true" # unsure Option "EnableAGPDMA" "True" # unsure Option "NoAccel" # or starts to lag after some time Identifier "IGP" Driver "openchrome" BusID "PCI:1:0:0" EndSection Section "Module" # unsure Disable ...

BZFlag on GMA900 of Eee PC is playable with a trick

Runs very nice, at about 30-40 FPS on laser sniping, but only when the settings are adjusted correctly ! Out of box experience is garbage, performing something between 5 to 10 FPS on a random map, but of course a lot depends on the specific map. After going through hoops of tweaking, I went as far as uninstalling the game and completely giving up. That was until recently, as on second thought, I simply couldn't believe that such simple polygon graphics advertised to support legacy PC's chokes on a 3D accelerator. I gave it another try, and as how it generally goes, your calm mind works much better on the same problem after having left it get organized by your brain subconsciously over time. All in all, after literally toggling every option available from the GUI, I had to conclude that it wasn't the 3D effects which were holding back the computer or even the antialiased radar map in the corner - it was the overlayed bitmapped text ! At first I couldn't believe my ey...

Fractals of mine

Image
Although, I have uploaded these previously , here's a version which you can copy & paste into the online interpreter : to flake :s :n ifelse :n=0 [fd :s] [flake :s/3 :n-1 rt 60 flake :s/3 :n-1 lt 120 flake :s/3 :n-1 rt 60 flake :s/3 :n-1] end to koch :s :n pu fd :s*57/100 pd rt 210 repeat 3 [flake :s :n lt 120] lt 210 pu bk :s*57/100 end to put1 :s :n :k setpencolor :n+2 koch :s :n pu fd :s*12/10 pd rt 360/:k if :n>0 [put1 :s :n-1:k] end to put :s :n pu lt 135 fd :s rt 135 put1 :s :n-1 :n end cs put 100 5

Javascript Logo interpreter

Online JavaScript Logo interpreter some very beautiful and terse Logo examples The following is one of my favorites from there. Hypercube, by Frank Caggiano, U.S.: repeat 8 [repeat 4 [rt 90 fd 100] bk 100 lt 45] edit: You can also find two simple examples of mine at my repository .

Binary numbers toy in Erlang GS graphics

Because of popular demand, I have ported the previous example to Erlang using it's built-in GS package. Enjoy! :-D All code and text in this post is Copyright (c) bkil.hu [also known as bkil], 2009; and is licensed under the GNU GPL v2. Refer to the standard license texts from June 1991 for exact conditions. Here is an example link: http://www.gnu.org/licenses/gpl-2.0.html Here's the core (simbins.erl): -module(simbins). -export([radix/3, binaries/2, simbins/1]). %% Radix conversion with LSB output. radix(_,0,_) -> []; radix(R,W,N) -> [N rem R | radix(R, (W-1), (N div R))]. %% A full-matrix transpose stub. transpose([H|T]) when is_list(H) -> Append = fun(V, M) -> lists:zipwith(fun(E,L) -> [E|L] end, V, M) end, Vector = fun(L) -> lists:map(fun(E) -> [E] end, L) end, [RH|RT] = lists:reverse([H|T]), lists:foldl(Append, Vector(RH), RT). %% 'binaries' is a solution to Paul R. Potts's idea. %% Prepend `lists:reverse( ` to get MSB. bi...

Binary numbers toy in Haskell SOE graphics

Image
I've been browsing Mr. Paul R. Potts's blog when I stumbled across a simple, yet neat idea. I was not quite satisfied with the lengthy solution given, so I decided to construct something similar looking from scratch. I'm using the Hugs and GHC built-in HGL/Graphics.SOE package. See the result below. Expect to see more later. All code, text and the 5 images in this post are Copyright (c) bkil.hu [also known as bkil], 2009. I place the images in the public domain. The code and text are licensed under the GNU GPL v2. Refer to the standard license texts from June 1991 for exact conditions. Here is an example link: http://www.gnu.org/licenses/gpl-2.0.html Here's the core (Simbins.hs): module Simbins where import Data.List(transpose) -- Radix conversion with LSB output. radix _ 0 _ = [] radix r w n = (n `mod` r : radix r (w-1) (n `div` r)) -- 'binaries' is a solution to Paul R. Potts's idea. -- Prepend `reverse . ` to get MSB. binaries w = transpose . map (radix ...

A logo for my T-shirt?

Planning to construct a logo for a T-shirt has been on my mind for some time now. It should look neat, but be practical at the same time. What I am certain of at the moment, is that the design ought to include program source code or ASCII art of some sort. License will be GPL of course ;-> In both cases, the number of characters should be minimal. I'm thinking along the lines of a few hundred bytes or so, and about six or seven lines of code. Readability is at paramount: a well educated person if mathematics, information technology or engineering ought to understand it in a minute.