shadow rgb

responsive shadow sculpture

Shadow RGB is a responsive “shadow art” sculpture, a three-dimensional collection of triangles, that when lit/projected from particular angles create red, green or blue projections. Shadow RGB is inspired by the idea of construction and deconstruction of images and projections. Using the fundamental system for representing the colors to be used on a computer display, RGB, we created a program where the user can input their image, and the result is a spherical polygon-cloud which projects individual RGB images from specific views.
KEYWORDS
processing; imaging; design computation; parametric design; digital media; user interface; interactive design; data visualization; digital modeling; digital fabrication; motion graphics; digital art

image reconstruction
FOR INTERACTIVE VISUALS

‍

1    CONCEPT: RGB eXTRACTION

Using the fundamental system for representing the colors to be used on a computer display, RGB, our aim is to create a program(with C#) where the user can input their image, and the result is a spherical polygon-cloud which projects individual RGB extracted shadows from specific views.

‍

2    METHODOLOGY

2.1 Sketch | Workflow

The initial prototyping of RGB processing was done in p5.js and grasshopper.

Figure 1: Triangular halftone    
2.2     Code

The core process of SHADOW RGB including creating rotational point cloud with x, y, z and remapping image color information(hue and brightness) to three faces. The faces are grouped with red, green, blue in three direction with three group of triangular faces that perpendicular to each other. Higher brightness will result in bigger triangles.

Figure 2: Algorithm

private void RunScript (
string imageFile,            // original image file
int d,                                      // size per triangulation
double distan,                 // cube to sphere
ref object A,                     // output geometry
ef object B                        // rotation center
) {

System.Drawing.Bitmap mybmp = new System.Drawing.Bitmap(imageFile);

int z = 20;                                                    // offset from origin
int rx = (mybmp.Width - 1);              // image width
int ry = (mybmp.Height - 1);            // image height

List<system.drawing.color> colors = new List<system.drawing.color>();</system.drawing.color></system.drawing.color>
List<mesh> mee = new List<mesh>();                                                   </mesh></mesh>// start list of mesh
‍
Point3d center = new Point3d(rx / 2, ry / 2, rx / 2);                        // center point of output geometry
Point3d origin = new Point3d(rx / 2, ry / 2, rx / 2 + z);

for (int i = 0; i < rx; i++) {            // loop system for x, y, z faces
for (int j = 0; j < ry; j++) {
for (int k = 0; k < rx; k++) {

System.Drawing.Color a = mybmp.GetPixel( j, rx - k);            // corresponding color system for each face
System.Drawing.Color b = mybmp.GetPixel(i, ry - j);
System.Drawing.Color c = mybmp.GetPixel(i, rx - k);
double valR = a.R;
double valG = b.G;
double valB = c.B;

Mesh m = new Mesh();            // create new mesh

Point3d current = new Point3d(i, j, k);                                          // setting spherical boundary through condition
double centertocurrent = center.DistanceTo(current);
if(centertocurrent < distan){

Point3d p1 = new Point3d(i, j, z + valR / d + k);                        // setting vertices
Point3d p2 = new Point3d(i + valG / d, j, z + k);
Point3d p3 = new Point3d(i, j + valB / d, z + k);
Point3d p0 = new Point3d(i, j, z + k);
‍
m.Vertices.Add(p0);            // vertices for Green
m.Vertices.Add(p1);
m.Vertices.Add(p2);
‍
m.Vertices.Add(p0);             // vertices for Blue
m.Vertices.Add(p2);
m.Vertices.Add(p3);
‍
m.Vertices.Add(p0);            // vertices for Red
m.Vertices.Add(p3);
m.Vertices.Add(p1);
‍
m.VertexColors.Add(0, 255, 0);            // coloration (Green)
m.VertexColors.Add(0, 255, 0);
m.VertexColors.Add(0, 255, 0);

m.VertexColors.Add(0, 0, 255);            // coloration (Blue)
m.VertexColors.Add(0, 0, 255);
m.VertexColors.Add(0, 0, 255);
‍
m.VertexColors.Add(255, 0, 0);            // coloration (Red)
m.VertexColors.Add(255, 0, 0);
m.VertexColors.Add(255, 0, 0);
m.Faces.AddFace(0, 1, 2);                        // G            // create face from vertices
m.Faces.AddFace(3, 4, 5);                        // B            // create face from vertices
m.Faces.AddFace(6, 7, 8);                        // R            // create face from vertices

mee.Add(m);                                                    // add per triangle to mesh
}
}
}
}
A = mee;               // export meshes
B = origin;            // export rotational origin

}

Figure 3: Video frames
Figure 4: Final script incorporated with C# program
Figure 4a: Top view
Figure 4b: Front view
Figure 4c: Right view

Final example is generated from Peppa Pig. The shadow outcome of the sculpture is tested with real-time lights in vray.

Yiqi, designer, technologist, artist.

about ME
CONTACT ME
⇑ TOPBACK TO WORKS


Have a good day !
HOME
Contacts
WA, USA
vanyiqi@gmail.com
sirrandom
Follow
/Long dream stretches, because of you.
Copyright © 2022 Yiqi Zhao. All rights reserved. 0_0