| Andrew Cooke | Contents | RSS | Twitter | Previous

C[omp]ute

Welcome to my blog, which was once a mailing list of the same name and is still generated by mail. Please reply via the "comment" links.

Always interested in offers/projects/new ideas. Eclectic experience in fields like: numerical computing; Python web; Java enterprise; functional languages; GPGPU; SQL databases; etc. Based in Santiago, Chile; telecommute worldwide. CV; email.

Personal Projects

Lepl parser for Python.

Colorless Green.

Photography around Santiago.

SVG experiment.

Professional Portfolio

Calibration of seismometers.

Data access via web services.

Cache rewrite.

Extending OpenSSH.

C-ORM: docs, API.

Recent Threads

Interesting Argentinian Author - Antonio Di Benedetto

Useful Thread on MetaPhysics

RAND on fighting online anarchy (2001)

NSA Hacked

Very Good LRB Article on Brexit

Nussbaum on Anger

Apple + Kiwi Jam

Sudoku - CSP + Chaos

Recycling Electronics In Santiago

Vector Displays in OpenGL

OpenGL - Render via Intermediate Texture

Using Garmin Forerunner 230 With Linux

(Beating Dead Horse) StackOverflow

Current State of Justice in China

Axiom of Determinacy

Fee Chaos Book

Course on Differential Geometry

Sparse Matrices, Deep Learning

Applebaum Rape

Tomato Chutney v4

Culturally Liberal and Nothing More

Recent Replies

Now Is Cat Soft LLC's Chance To Save Up To 32% On Mail

Call Center Services for Cat Soft LLC

Credit Card Processing for Cat Soft LLC

Discover new movies on demand in our online cinema

Tasting

Credit Card Processing for Cat Soft LLC

Hit Me

Increase Efficiency with GPS Vehicle Tracking for Cat Soft LLC

Call Center Services for Cat Soft LLC

And Anti-Aliased

And Garmin Connect

Payroll Service Quotes for Cat Soft LLC

Now Is Cat Soft LLC's Chance To Save Up To 32% On Mail

Ewww

Increase Efficiency with GPS Vehicle Tracking for Cat Soft LLC

Okay, but...

Sounds Bad

Have to add...

Your diamond is a beaten up mess

Excellent

More Recently

© 2006-2015 Andrew Cooke (site) / post authors (content).

Weird Componentized Virus

Permalink | Comment on this post

Previous Entries

For comments, see relevant pages (permalinks).

Interesting Argentinian Author - Antonio Di Benedetto

From: andrew cooke <andrew@...>

Date: Fri, 26 Aug 2016 16:11:26 -0300

http://lithub.com/a-masterpiece-of-latin-american-literature-finally-appears-in-english/

Andrew

Permalink

Useful Thread on MetaPhysics

From: andrew cooke <andrew@...>

Date: Fri, 26 Aug 2016 06:57:00 -0300

https://www.reddit.com/r/askphilosophy/comments/4zl4zb/james_ladyman_made_me_lose_my_groove/

Andrew

Permalink

RAND on fighting online anarchy (2001)

From: andrew cooke <andrew@...>

Date: Thu, 25 Aug 2016 10:48:15 -0300

http://www.rand.org/pubs/monograph_reports/MR1382.html

Andrew

Permalink

Very Good LRB Article on Brexit

From: andrew cooke <andrew@...>

Date: Mon, 1 Aug 2016 10:05:08 -0400

http://www.lrb.co.uk/v38/n15/john-lanchester/brexit-blues

Andrew

Permalink

Nussbaum on Anger

From: andrew cooke <andrew@...>

Date: Wed, 27 Jul 2016 15:33:55 -0400

https://aeon.co/essays/there-s-no-emotion-we-ought-to-think-harder-about-than-anger

One for the "to read" pile.

Andrew

Permalink

Apple + Kiwi Jam

From: andrew cooke <andrew@...>

Date: Sun, 17 Jul 2016 16:50:01 -0400

Just made this:

 1.9 kg Fuji apples (2kg before decoring)
 0.7 kg Kiwi (1kg before peeling)
 2 kg Brown sugar
 Juice of 2 lemons
 3 tsp Vanilla flavouring
 200 ml Water

Peel the kiwis as shown on youtube (with a spoon) and quarter.
Quarter the apples, cut out the core, and quarter again.

Everything in a pan.  I added the water only to avoid any burning at
the start.

Boil for ~2.5 hours.

At ~2 hours, the fruit hadn't broken down enough (and was making it
difficult to stir with what I guess is local superheating).  So I took
the pan from the heat and blended the fruit with a hand blender.  This
wasn't as difficult as I expected - just don't turn the blender on
until the blade is under the liquid.

Initial test suggests that it's quite sweet and otherwise rather
bland.  But it's winter...

Produced just over 3kg of (dark) jam.

Andrew

Permalink

Sudoku - CSP + Chaos

From: andrew cooke <andrew@...>

Date: Mon, 11 Jul 2016 08:50:49 -0400

Mind-bending paper
http://www.nature.com/articles/srep00725

Andrew

Permalink

Recycling Electronics In Santiago

From: andrew cooke <andrew@...>

Date: Sun, 10 Jul 2016 10:29:18 -0400

http://www.chilenter.com

They organise recycing events in various comunas throughout the year
and accept donarions directly at Quinta Normal.

Andrew

Permalink

Vector Displays in OpenGL

From: andrew cooke <andrew@...>

Date: Fri, 8 Jul 2016 18:01:51 -0400

With Hexpilot I am trying to emulate the old vector displays.  You can
see an example and a brief discussion of the issues at
http://ascii.textfiles.com/archives/3786 but most of that page is
about scan lines.

My initial experiements have just hit a wall because modern OpenGL no
longer supports variable line widths.

That may sound odd - how does a plotting sysetem work without line
widths?  Part of the reason is that OpenGL works at either a higher or
a lower level - you describe a scene in terms of triangles, typically,
which are converted into fragments (something like pixels).  Lines get
lost in the middle.

OpenGL does have lines (as well as triangles), but they have a fixed
width and are hardly used (at least, as things actually displayed).

One alternative to using lines is to replace each line with a pair of
very long, thin triangles (arranged as a long thin rectangle).  That
works just fine until you start to worry about 3D images.

Because with 3D images on a vector display, distant lines are (often)
just as thick as nearby lines.  The line itself is not considered a
physical entity.  In contrast, OpenGL's 3D support is consistent:
distant "lines" (more exactly, distant triangles) are thinner.

THis may sound like something you can work round with a little maths.
Just scale the distant lines appropriately so that they end up all the
same size after perspective correction.  But a little thought suggests
that won't play well with hidden line removal.  In short: it's
difficult to bend the rules for some components of the display while
expecting others to stay working correctly.

So what to do?

My current best idea is to render triangles to a depth texture like
you would with shadow masking (except rendered from the real camera
viewpoint).  And then use that depth mask to do hidden line removal
"by hand" for a line-only rendering.

It will have some artefacts, but they are (I hope) the kind of
artefacts you would also see in old school hidden line removal code.

It's going to be a fair amount of work....

Andrew

Permalink

OpenGL - Render via Intermediate Texture

From: andrew cooke <andrew@...>

Date: Wed, 6 Jul 2016 14:49:07 -0400

I just got this working in hexpilot
https://github.com/andrewcooke/hexpilot

The display, instead of being rendered directly to the screen, is
rendered to an intermediate buffer (backed by a texture).  This
texture is then written to the output buffer.

Which is pointless, of course, but opens up a whole world of
possibilities.  The plan is to have a texture that accumulates several
display updates so that the screen blurs and smears like an old CRT
(the idea is to duplicate the old vector screens of asteroids, etc).

This would have been impossible without this excellent guide
http://learnopengl.com/#!Advanced-OpenGL/Framebuffers
which described exactly what I needed.

Even so, I can't believe that the code worked "first time" without me
having a blank screen for hours and hours as I searched for mistakes.
Yay!

Andrew

Permalink