superfluid drip

marcus • April 11th, 2008

particle-based viscoelastic fluid simulation

marcus • April 11th, 2008

amazing video by a clever canadian who has coded up a fluid simulation using particles, similar to what i’m currently working on in p5 – only that his one seems to be working ;-)

65.536 particles @ 513fps

marcus • April 11th, 2008



hell, yeah!
– while working on the liquids code i realized that i need LOTS more particles to generate the level of detail i found in the analog photographs i did before. so after a few days of reading hundreds of opengl tutorials, research papers, game developers articles and 20+ p5 tests i'm finally getting closer to writing a particle system that can simulate 65k - 262k particles in real-time at 60+ fps. on my laptop (!), not a specialized über-workstation – in case you wonder. that's a drastic increase over my previous java based system that could realistically do about 2k particles (10k was pushing it - ran at about 14 fps). ill post some details on the new system soon, when its ready ...

3D voronoi using GLSL

marcus • April 10th, 2008

Dynamic 3D Voronoi Demo from Moniker

ulrich rückriem - ikarus

vera • March 4th, 2008

The german sculptor Ulrich Rückriem, well known for geometrically divided and rearranged blocks of stone, now shows a series of conceptual drawings in a small exhibit at Museum Ludwig in Cologne. The black and white wall drawing and prints are based on a grid of 7×7=49 crosspoints. 7 points are selected and connected by straight lines which touch each point only one time and then get back to their origin. This produces a variety of acute-angled geometrical drawings.
The aesthetic system is based on what is known as a standoff situation in checkers game: Eight pieces stand on positions on the game board from where none of them can beat one another, neither on horizontal or vertical lines nor on diagonals.

image credit: Ulrich Rückriem, Ikarus, 2007 Copyright Ulrich Rückriem

spherical linear interpolation on a circle

marcus • March 3rd, 2008

how to do a slerp with angles?
that caused me some headache this morning. however, the solution is blatantly simple.
» example sketch

1
2
3
4
5
6
7
8
9
10

float angleSlerp(float cur, float to, float delta)
{
  if(cur < -HALF_PI && to > HALF_PI) {
    cur += TWO_PI;
  } else if(cur > HALF_PI && to < -HALF_PI) {  
    cur -= TWO_PI;
  }
  return cur * (1-delta) + to*delta;
}

M.Any

marcus • January 5th, 2008


» m-any.org

quaternion

marcus • November 5th, 2007

quilt

marcus • October 29th, 2007

nice geometric illustration work by icelandic design student siggi eggertsson

lsystem tree

marcus • October 24th, 2007

by Berlin based designer Andreas Nicolas Fischer

jeffrey docherty

marcus • October 13th, 2007

Source: jeffreydocherty.com

The Thinker (after Rodin)

marcus • October 9th, 2007

39 quasi-scientific paintings and drawings. Musing on the meaning of life, surrounding a twelve foot high black column filled with whirling computers. A hexagonal structure, The Thinker emits an electronic hum generated by the bank of computers inside. The computers are set to operate for 33,000 years with an LED display counting the seconds up to 76.5 years (the average human lifespan).

Tyson said it was his take on sculptor Rodin’s famous piece, The Thinker.

“The Thinker is a twelve foot high black column that houses a series of computers inside it, running an artificial life programme which has been programmed in such a way that it evolves. There is no physical manifestation of the fact that it is thinking, and I’m fascinated by the idea that when you come across it you have a thing that is thinking but which is impenetrable – that you can’t get within its skin. Once the thing sets off, I can predict that it’s thinking for about half an hour but after that I’ve got no idea – so I’m as much in the dark as everyone else as to what it’s actually thinking about.”

It is part of a series entitled “The Seven Wonders of the World”.

“That is a series of works that relate to things I find wonderous. I wanted to make works that were not illustrative of some scientific or philosophical theory but embodied it – were in fact the actual theory made manifest. The Thinker really thinks, and is thought. The fact that human beings have reached a stage where they can find a mathematical methodology for creating thought itself, and that we can comprehend our own existence, are some of the things I am trying to manifest in this work. It also relates to this idea that we can never actually prove what the internal dialogue of another human being actually is. It’s about the way in which everybody’s universe is impenetrable, and the way everyone who thinks has their own separate universe.”

Source: fineart.ac.uk

komet

marcus • September 25th, 2007

by kouhei_otsuki

chao

marcus • September 25th, 2007

chao, by Satoshi Aizawa

libCollada 0.2 released

marcus • September 22nd, 2007





libCollada now does colors!

the library is getting nearer to being actually useful. it now creates new collada materials and effects for you as needed without writing a line of extra code.

» project page
» download collada-0.2.zip

libCollada 0.1 released

marcus • September 14th, 2007

finally i found some time to finish a first release of my collada library for processing today.

it’s still quite basic and only exports triangles without any material information. however there have been major refactorings under the hood that will allow to add new features much easier.

it might output garbage when you try to do something clever but give it a go
- your comments & critics are appreciated!

» project page

» download collada-0.1.zip

tesseract 3d prints #2

marcus • September 5th, 2007

clean & naked

Collada Export Plugin for Processing

marcus • August 8th, 2007

libCollada allows you to easily export 3D geometry and material data in the COLLADA 1.4.1 format from your processing applications. Although processing’s drawing methods and COLLADA’s scenegraph based, more complex 3D description format, do not match directly – the library attempts to do a reasonable conversion, requiring no extra API to learn.

Releases

version 0.2

now creates materials & effects generated from standard p5 drawing commands
» collada-0.2.zip

version 0.1

first public release with examples and packaged for p5
» collada-0.1.zip

version 0.01 (08/06/07)

a first rather rough version that can export basic geometry data.

Source

You can checkout the latest revision with subversion from the repository with:

svn export http://svn.infostuka.org/rep/libCollada/trunk/

Useage

Use the plugin in the same way as you would with the PDF or PNG exporter.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import processing.opengl.*;
import infostuka.collada.p5.*;

void setup() {
  size(400, 400, OPENGL);
}


void keyPressed() {
  if (key == ' ') {
    record = true;
  }
}


void draw ()
{
    if (record) {
        beginRecord(P5ColladaExport.DAE, "output.dae");
    }

    // ... your drawing operations here ...

    if (record) {
        endRecord();
        record = false;
    }
}

Examples


Related

License

CC - Some rights reserved

Copyright © Marcus Wendt 2007
This library is licensed under the GNU LGPL

 

Permalink

 

Other Hypercubes

marcus • May 30th, 2007

Arche de la Défense, Paris

Dali “crucifixion”

“Ipercubo” by Attilio Pierelli

And of course the Timetraveler

Der n-dimensionale Hyperwürfel

marcus • May 30th, 2007

Eine kompakte Einführung in die Geometrie des Hyperwürfels.

“Der n-dimensionale Hyperwürfel” von Hans Walser, Mathematisches Institut Basel

PDF downloaden

Vector Operations in 4-Space

marcus • May 28th, 2007

Standard Operations

For the most part, vector operations in four space are simple extensions of their three-space counterparts. For example, computing the addition of two four-vectors is a matter of forming a resultant vector whose components are the sum of the pairwise coordinates of the two operand vectors. In the same fashion, subtraction, scaling, and dot-products are all simple extensions of their more common three-vector counterparts.

In addition, operations between four-space points and vectors are also simple extensions of the more common three-space points and vectors. For example, computing the four-vector difference of four-space points is a simple matter of subtracting pairwise coordinates of the two points to yield the four coordinates of the resulting four-vector.

For completeness, the equations of the more common four-space vector operations follow. In these equations, U = <U0, U1, U2, U3> and V = <V0, V1, V2, V3> are two source four-vectors and k is a scalar value:

        U + V = <U0 + V0, U1 + V1, U2 + V2, U3 + V3>

        U - V = <U0 - V0, U1 - V1, U2 - V2, U3 - V3>

           kV = <kU0, kU1, kU2, kU3>
          U·V = U0V0 + U1V1 + U2V2 + U3V3

Vector Cross Product

The main vector operation that does not extend trivially to four-space is the cross product. A three-dimensional space is spanned by three basis vectors, so the cross-product in three-space computes an orthogonal three-vector from two linearly independent three-vectors. Hence, the three-space cross product is a binary operation.

In N-space, the resulting vector must be orthogonal to the remaining N-1 basis vectors. Since a four-dimensional space requires four basis vectors, the four-space cross product requires three linearly independent four-vectors to determine the remaining orthogonal vector. Hence, the four-space cross product is a trinary operation; it requires three operand vectors and yields a single resultant vector. In the remainder of this paper, the four-dimensional cross product will be represented in the form X4(U,V,W).

To find the equation of the four-dimensional cross product, we must first establish criteria of the cross product. These are as follows:

  1. If the operand vectors are not linearly independent, the cross product must be the zero vector.
  2. If the operand vectors are linearly independent, then the resultant vector must be orthogonal to each of the operand vectors.
  3. The four-space cross product preserves scaling, i.e. for any scalar k: kX4(U,V,W) = X4(kU,V,W) = X4(U,kV,W) = X4(U,V,kW)
  4. Changing the order of two of the operands results only in a sign change of the resultant vector.

It turns out that a somewhat simple-minded approach to computing the four-dimensional cross product is the correct one. To motivate this idea, we first consider the three-dimensional cross product. The 3D cross product can be thought of as the determinant of a 3x3 matrix whose entries are as follows:

                  +-        -+
                  | i  j  k  |
        X3(U,V) = | U0 U1 U2 |
                  | V0 V1 V2 |
                  +-        -+

where U and V are the operand vectors, and i, j & k represent the unit components of the resultant vector. The determinant of this matrix is

    i (U1V2 - U2V1) - j (U0V2 - U2V0) + k (U0V1 - U1V0)

which is the three-dimensional cross product. Using this idea, we'll form the analogous 4x4 matrix, and see if it meets the four cross product properties listed above:

[2.1a]

                    +-           -+
                    | i  j  k  l  |
        X4(U,V,W) = | U0 U1 U2 U3 |
                    | V0 V1 V2 V3 |
                    | W0 W1 W2 W3 |
                    +-           -+

The determinant of this matrix is


[2.1b]

         |U1 U2 U3|    |U0 U2 U3|    |U0 U1 U3|    |U0 U1 U2|
        i|V1 V2 V3| - j|V0 V2 V3| + k|V0 V1 V3| - l|V0 V1 V2|
         |W1 W2 W3|    |W0 W2 W3|    |W0 W1 W3|    |W0 W1 W2|

If the operand vectors are linearly dependent, then the vector rows of the 4x4 matrix will be linearly dependent, and the determinant of this matrix will be zero. This satisfies the first condition. The third condition is also satisfied, since a scalar multiple of one of the vectors yields a scalar multiple of one of the rows of the 4x4 matrix. This results in a determinant that is scaled by that factor, so condition three is also met.

The fourth condition falls out as a property of determinants, i.e. when two rows of a determinant matrix are interchanged, only the sign of the determinant changes. Hence, the fourth condition is also met.

The second condition is proven by calculating the dot product of the resultant vector with each of the operand vectors. These dot products will be zero if and only if the resultant vector is orthogonal to each of the operand vectors.

The dot product of the resultant vector X4(U,V,W) with the operand vector U is the following (refer to equation [2.1b]):

                           U·X4(U,V,W) =

      |U1 U2 U3|     |U0 U2 U3|     |U0 U1 U3|     |U0 U1 U2|
    U0|V1 V2 V3| - U1|V0 V2 V3| + U2|V0 V1 V3| - U3|V0 V1 V2|
      |W1 W2 W3|     |W0 W2 W3|     |W0 W1 W3|     |W0 W1 W2|

This dot product can be rewritten as the determinant

        | U0 U1 U2 U3 |
        | U0 U1 U2 U3 |
        | V0 V1 V2 V3 |
        | W0 W1 W2 W3 |,

which is zero, since the first two rows are identical. Hence, the resultant vector X4(U,V,W) is orthogonal to the operand vector U. In the same way, the dot products of V·X4(U,V,W) and W·X4(U,V,W) are given by the determinants

        | V0 V1 V2 V3 |           | W0 W1 W2 W3 |
        | U0 U1 U2 U3 |           | U0 U1 U2 U3 |
        | V0 V1 V2 V3 |    and    | V0 V1 V2 V3 |
        | W0 W1 W2 W3 |           | W0 W1 W2 W3 |,

which are each zero.

Therefore, the second condition is also met, and equation [2.1a] meets all four of the criteria for the four-dimensional cross product.

Since the calculation of the four-dimensional cross product involves 2x2 determinants that are used more than once, it is best to store these values rather than re-calculate them. The following algorithm uses this idea.

// Cross4 computes the four-dimensional cross product of the three vectors
// U, V and W, in that order.  It returns the resulting four-vector.

Vector4 *Cross4 (Vector4 *result, Vector4 U, Vector4 V, Vector4 W)
{
    double A, B, C, D, E, F;       // Intermediate Values

    // Calculate intermediate values.

    A = (V[0] * W[1]) - (V[1] * W[0]);
    B = (V[0] * W[2]) - (V[2] * W[0]);
    C = (V[0] * W[3]) - (V[3] * W[0]);
    D = (V[1] * W[2]) - (V[2] * W[1]);
    E = (V[1] * W[3]) - (V[3] * W[1]);
    F = (V[2] * W[3]) - (V[3] * W[2]);

    // Calculate the result-vector components.

    *result[0] =   (U[1] * F) - (U[2] * E) + (U[3] * D);
    *result[1] = - (U[0] * F) + (U[2] * C) - (U[3] * B);
    *result[2] =   (U[0] * E) - (U[1] * C) + (U[3] * A);
    *result[3] = - (U[0] * D) + (U[1] * B) - (U[2] * A);

    return result;
}
Source: Four-Space visualization of 4D Objects
3d 4-space abstract aesthetic system aesthetics algorithm alien ambient ambisonics animation architecture art artificial audio audio research black&white book caskets classic clicks & cuts code color computer-vision conceptual art consoles cpp culture ddr design devices digtial fabrication documenta documentation drawing dynamics electricity electromagnetism electronics environment event exhibition experimental exploration fashion festival film flocking folk food fractal furniture gamedev generative genetic geometry glitch graphic hacks haptics hardware history hyperspace ideas illustration images inspiration installation instrument intelligence interactive interieur japan java knowledge management landscape library life light liquid live london math micro minimal modernism monochrome motion motion graphics multiples music naming nature nervous ink networked networking opensource osx painting paper particles performance personal photography physics playful politics press print processing processing.org programming quotes recipes research retro romance ruby scripts sculpture SENDUNG.net shopping snippets social software sound space space exploration craft space exploration craft orbiter supercollider swiss systems technology theory theremin toys transformed travel tricks typography universe video visual vj water web2.0 xcode