<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-398842201331776705</id><updated>2011-11-28T01:33:19.876+01:00</updated><category term='space'/><category term='tubes'/><category term='escher'/><category term='javascript'/><category term='wallpaper'/><category term='Lyapunov'/><category term='maze'/><category term='labyrinth'/><category term='VBO'/><category term='blogspot'/><category term='subdivision'/><category term='minnaert'/><category term='Truchet'/><category term='bunny'/><category term='broccoli'/><category term='woman'/><category term='gravity'/><category term='Tiling'/><category term='lattice'/><category term='topmod'/><category term='topologic'/><category term='brdf'/><category term='pinart'/><category term='fractal'/><category term='Texts'/><category term='blogger'/><category term='3D'/><category term='render'/><category term='cylindrical camera'/><category term='tube'/><category term='paths'/><category term='infinite'/><category term='html'/><category term='CUDA'/><category term='partition'/><category term='stanford'/><category term='infinity'/><category term='ifs'/><category term='bilingual'/><category term='pathtracing'/><category term='pipes'/><category term='global illumination'/><category term='House Of Stairs'/><category term='OpenGL'/><category term='spherical lens'/><title type='text'>Voxelizer</title><subtitle type='html'>Ideas, renders, experiments in 3D</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-9146160091390369389</id><published>2011-05-26T03:36:00.007+02:00</published><updated>2011-05-26T04:05:02.513+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lyapunov'/><category scheme='http://www.blogger.com/atom/ns#' term='CUDA'/><category scheme='http://www.blogger.com/atom/ns#' term='3D'/><category scheme='http://www.blogger.com/atom/ns#' term='VBO'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><title type='text'>Lyapunov 3D</title><content type='html'>&lt;a href="#"&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blk_1" style="display: inline;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;T&lt;/span&gt;oday I'm going to comment a small program that it's not fully related to raytrace, but is related to 3D.&lt;br /&gt;&lt;br /&gt;It has been some time since I have tried to represent the Markus-Lyapunov fractal. The 3D version extends the exponent computation one dimension. I have used CUDA and OpenGL to represent that.&lt;br /&gt;&lt;br /&gt;Thanks to CUDA it's possible do computation using the GPU, so, if you have a good video card, the computation will be quite fast.&lt;br /&gt;&lt;br /&gt;The variation of the algorithm is simple. The sequences contain one more letter, in this case C, that represents a point in the Z coordinate (or 'c'). Everything else is similar to the previous algorithm.&lt;br /&gt;&lt;br /&gt;In order to do the renders I use two VBOs: One for storing positions and another one to store colors. The positions will be arranged in a volume of 256x256x256 elements. To compute the colors of each voxel I use two kernels. One computes the positions of each point and stores them in one VBO. The other use that positions to compute the color, that is the lyapunov exponent in that point. The points with an exponent greater than zero (or greater than a cut-off value) are moved to a region in order to not disturb.  The points with a negative exponent (or lower than the cutoff value) will be drawn with a color proportional to the absolute value of the exponent.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/--mcKOfDP8R4/Td2uudozroI/AAAAAAAAAT8/jo2bUUx0wAA/s1600/Lyap3d.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 311px; height: 320px;" src="http://4.bp.blogspot.com/--mcKOfDP8R4/Td2uudozroI/AAAAAAAAAT8/jo2bUUx0wAA/s320/Lyap3d.jpg" alt="" id="Img3" border="0" /&gt;&lt;/a&gt;Space region (0,4)-(0,4)-(0,4)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-EtadGhLRlGM/Td2uunWJtsI/AAAAAAAAAUE/jDc2QTs5DMc/s1600/Lyap3d_02.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 316px; height: 320px;" src="http://3.bp.blogspot.com/-EtadGhLRlGM/Td2uunWJtsI/AAAAAAAAAUE/jDc2QTs5DMc/s320/Lyap3d_02.jpg" alt="" id="Img2" border="0" /&gt;&lt;/a&gt;Space region (1,4)-(1,4)-(1,4)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-Cd9do13N2UY/Td2uu7ryhYI/AAAAAAAAAUM/JVfcT5C8gIg/s1600/Lyap3d_03.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 310px;" src="http://1.bp.blogspot.com/-Cd9do13N2UY/Td2uu7ryhYI/AAAAAAAAAUM/JVfcT5C8gIg/s320/Lyap3d_03.jpg" alt="" id="Img1" border="0" /&gt;&lt;/a&gt;Adjusting the cut-off value in order to remove some information about stability.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-NKbjfbbFE90/Td2uu8aPkJI/AAAAAAAAAUU/3YvfO4MNOSY/s1600/Lyap3d_04.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 318px; height: 320px;" src="http://2.bp.blogspot.com/-NKbjfbbFE90/Td2uu8aPkJI/AAAAAAAAAUU/3YvfO4MNOSY/s320/Lyap3d_04.jpg" alt="" id="BLOGGER_PHOTO_ID_5610832832286920850" border="0" /&gt;&lt;/a&gt;Readjusting the cut-off value to be nearer to zero.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The code for computing the Lyapunov 3D exponent for the sequence ABC is this:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;__device__ float evalLyap(float3 p)&lt;br /&gt;{&lt;br /&gt;float sum=0;&lt;br /&gt;float Xn=0.5f;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;for (int i = 0; i &amp;lt; 3; i++) {&lt;br /&gt; float rn = i==2 ? p.x : i==1? p.y : p.z;&lt;br /&gt; Xn=rn*Xn*(1-Xn);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int iterations=lyapunovParams.iterations;&lt;br /&gt;for (int n=0;n&amp;lt;iterations;n++){&lt;br /&gt; float prod_deriv=1;&lt;br /&gt; for (int i = 0; i &amp;lt; 3; i++) {&lt;br /&gt;  float rn = i==2 ? p.x : i==1? p.y : p.z;&lt;br /&gt;  Xn=rn*Xn*(1-Xn);&lt;br /&gt;  prod_deriv *= rn*(1-2*Xn);&lt;br /&gt; }&lt;br /&gt; float q=log(fabs(prod_deriv));&lt;br /&gt; sum+=q;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return sum/(iterations*3);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is the Kernel code for computing the positions of the evaluating points:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;__global__ void kernelGeneration(float3 *ptr, int dim)&lt;br /&gt;{&lt;br /&gt;int xx=threadIdx.x + blockIdx.x*blockDim.x;&lt;br /&gt;int yy=threadIdx.y + blockIdx.y*blockDim.y;&lt;br /&gt;int offset=xx + yy*blockDim.x*gridDim.x;&lt;br /&gt;&lt;br /&gt;int res=dim*dim;&lt;br /&gt;int z=truncf(offset/res);&lt;br /&gt;res=offset-z*res;&lt;br /&gt;int y=truncf(res/dim);&lt;br /&gt;int x=res-y*dim;&lt;br /&gt;&lt;br /&gt;float fx = x/(float)dim;&lt;br /&gt;float fy = y/(float)dim;&lt;br /&gt;float fz = z/(float)dim;&lt;br /&gt;&lt;br /&gt;ptr[offset].x=fx;&lt;br /&gt;ptr[offset].y=fy;&lt;br /&gt;ptr[offset].z=fz;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;And finaly this is the Kernel code for computing the colors of those points:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;__global__ void kernelComputation(float3 *ptrPos, float4 *ptrCol, int dim)&lt;br /&gt;{&lt;br /&gt;int xx=threadIdx.x + blockIdx.x*blockDim.x;&lt;br /&gt;int yy=threadIdx.y + blockIdx.y*blockDim.y;&lt;br /&gt;int offset=xx + yy*blockDim.x*gridDim.x;&lt;br /&gt;&lt;br /&gt;float3 pos=ptrPos[offset];&lt;br /&gt;&lt;br /&gt;pos.x*=lyapunovParams.maxX-lyapunovParams.minX;&lt;br /&gt;pos.y*=lyapunovParams.maxY-lyapunovParams.minY;&lt;br /&gt;pos.z*=lyapunovParams.maxZ-lyapunovParams.minZ;&lt;br /&gt;pos.x+=lyapunovParams.minX;&lt;br /&gt;pos.y+=lyapunovParams.minY;&lt;br /&gt;pos.z+=lyapunovParams.minZ;&lt;br /&gt;&lt;br /&gt;float lambda=evalLyap(pos);&lt;br /&gt;float alpha=1;&lt;br /&gt;&lt;br /&gt;if (lambda&amp;lt;-lyapunovParams.cut_off) {&lt;br /&gt; lambda+=lyapunovParams.cut_off;&lt;br /&gt; float l=-lambda*lyapunovParams.factor;&lt;br /&gt; if (l&amp;lt;0)l=0;&lt;br /&gt; if (l&amp;gt;1)l=1;&lt;br /&gt; ptrCol[offset].x=l;&lt;br /&gt; ptrCol[offset].y=l;&lt;br /&gt; ptrCol[offset].z=l;&lt;br /&gt; ptrCol[offset].w=l;&lt;br /&gt;} else {&lt;br /&gt; ptrCol[offset].x=0;&lt;br /&gt; ptrCol[offset].y=0;&lt;br /&gt; ptrCol[offset].z=0;&lt;br /&gt; ptrCol[offset].w=0;&lt;br /&gt; ptrPos[offset].x=0;&lt;br /&gt; ptrPos[offset].y=0;&lt;br /&gt; ptrPos[offset].z=0;&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blk_2" style="display: none;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;H&lt;/span&gt;oy voy a comentar un pequeño programa que no está totalmente relacionado con el tema del raytrace pero sí con el 3D.&lt;br /&gt;&lt;br /&gt;Desde hace tiempo he intentado representar una versión tridimensional del fractal de Markus-Lyapunov. La versión 3D extiende el cómputo del exponente una dimensión más. Para realizarlo he utilizado CUDA y OpenGL.&lt;br /&gt;&lt;br /&gt;Gracias a CUDA se puede realizar computación utilizando la GPU, lo cual, si se tiene una buena tarjeta de vídeo, puede hacer que la velocidad de cálculo sea bastante rápida.&lt;br /&gt;&lt;br /&gt;La variación del algoritmo es sencilla. La secuencias contienen una letra más, en este caso C, que representa el punto en la coordenada Z (o 'c'). Todo lo demás es similar al algoritmo anterior.&lt;br /&gt;&lt;br /&gt;Para realizar los renders utilizo dos VBOs: uno para almacenar posiciones y otro almacenar para colores. Las posiciones están repartidas en un volumen de 256x256x256 elementos. Para computar los colores de cada voxel utilizo dos kernels. Uno realiza el computo de las posiciones y las almacena en un VBO. El otro utiliza esas posiciones para realizar el computo de color, que es el exponente de lyapunov en ese punto. Para los puntos en los que el exponente es mayor que cero (o si se desea mayor que un valor de corte dado) el punto se lleva al origen para que no moleste. Para los puntos en que el exponente es menor que cero (o que el valor de cutoff) se pinta con un color proporcional al módulo de ese exponente.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/--mcKOfDP8R4/Td2uudozroI/AAAAAAAAAT8/jo2bUUx0wAA/s1600/Lyap3d.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 311px; height: 320px;" src="http://4.bp.blogspot.com/--mcKOfDP8R4/Td2uudozroI/AAAAAAAAAT8/jo2bUUx0wAA/s320/Lyap3d.jpg" alt="" id="Img4" border="0" /&gt;&lt;/a&gt;Región espacial (0,4)-(0,4)-(0,4)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-EtadGhLRlGM/Td2uunWJtsI/AAAAAAAAAUE/jDc2QTs5DMc/s1600/Lyap3d_02.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 316px; height: 320px;" src="http://3.bp.blogspot.com/-EtadGhLRlGM/Td2uunWJtsI/AAAAAAAAAUE/jDc2QTs5DMc/s320/Lyap3d_02.jpg" alt="" id="Img5" border="0" /&gt;&lt;/a&gt;Región espacial (1,4)-(1,4)-(1,4)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-Cd9do13N2UY/Td2uu7ryhYI/AAAAAAAAAUM/JVfcT5C8gIg/s1600/Lyap3d_03.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 310px;" src="http://1.bp.blogspot.com/-Cd9do13N2UY/Td2uu7ryhYI/AAAAAAAAAUM/JVfcT5C8gIg/s320/Lyap3d_03.jpg" alt="" id="Img6" border="0" /&gt;&lt;/a&gt;Ajuste del valor de corte para quitar algo de información de estabilidad.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-NKbjfbbFE90/Td2uu8aPkJI/AAAAAAAAAUU/3YvfO4MNOSY/s1600/Lyap3d_04.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 318px; height: 320px;" src="http://2.bp.blogspot.com/-NKbjfbbFE90/Td2uu8aPkJI/AAAAAAAAAUU/3YvfO4MNOSY/s320/Lyap3d_04.jpg" alt="" id="Img7" border="0" /&gt;&lt;/a&gt;Reajuste del valor de corte para que esté más cercano a cero.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;El código para computar el exponente de Lyapunov en 3D es este:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;__device__ float evalLyap(float3 p)&lt;br /&gt;{&lt;br /&gt;float sum=0;&lt;br /&gt;float Xn=0.5f;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;for (int i = 0; i &amp;lt; 3; i++) {&lt;br /&gt; float rn = i==2 ? p.x : i==1? p.y : p.z;&lt;br /&gt; Xn=rn*Xn*(1-Xn);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int iterations=lyapunovParams.iterations;&lt;br /&gt;for (int n=0;n&amp;lt;iterations;n++){&lt;br /&gt; float prod_deriv=1;&lt;br /&gt; for (int i = 0; i &amp;lt; 3; i++) {&lt;br /&gt;  float rn = i==2 ? p.x : i==1? p.y : p.z;&lt;br /&gt;  Xn=rn*Xn*(1-Xn);&lt;br /&gt;  prod_deriv *= rn*(1-2*Xn);&lt;br /&gt; }&lt;br /&gt; float q=log(fabs(prod_deriv));&lt;br /&gt; sum+=q;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return sum/(iterations*3);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Este es el código de Kernel para computar las posiciones de los puntos de evaluación:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;__global__ void kernelGeneration(float3 *ptr, int dim)&lt;br /&gt;{&lt;br /&gt;int xx=threadIdx.x + blockIdx.x*blockDim.x;&lt;br /&gt;int yy=threadIdx.y + blockIdx.y*blockDim.y;&lt;br /&gt;int offset=xx + yy*blockDim.x*gridDim.x;&lt;br /&gt;&lt;br /&gt;int res=dim*dim;&lt;br /&gt;int z=truncf(offset/res);&lt;br /&gt;res=offset-z*res;&lt;br /&gt;int y=truncf(res/dim);&lt;br /&gt;int x=res-y*dim;&lt;br /&gt;&lt;br /&gt;float fx = x/(float)dim;&lt;br /&gt;float fy = y/(float)dim;&lt;br /&gt;float fz = z/(float)dim;&lt;br /&gt;&lt;br /&gt;ptr[offset].x=fx;&lt;br /&gt;ptr[offset].y=fy;&lt;br /&gt;ptr[offset].z=fz;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Y finalmente este es el código de kernel para computar los colores de dichos puntos:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;__global__ void kernelComputation(float3 *ptrPos, float4 *ptrCol, int dim)&lt;br /&gt;{&lt;br /&gt;int xx=threadIdx.x + blockIdx.x*blockDim.x;&lt;br /&gt;int yy=threadIdx.y + blockIdx.y*blockDim.y;&lt;br /&gt;int offset=xx + yy*blockDim.x*gridDim.x;&lt;br /&gt;&lt;br /&gt;float3 pos=ptrPos[offset];&lt;br /&gt;&lt;br /&gt;pos.x*=lyapunovParams.maxX-lyapunovParams.minX;&lt;br /&gt;pos.y*=lyapunovParams.maxY-lyapunovParams.minY;&lt;br /&gt;pos.z*=lyapunovParams.maxZ-lyapunovParams.minZ;&lt;br /&gt;pos.x+=lyapunovParams.minX;&lt;br /&gt;pos.y+=lyapunovParams.minY;&lt;br /&gt;pos.z+=lyapunovParams.minZ;&lt;br /&gt;&lt;br /&gt;float lambda=evalLyap(pos);&lt;br /&gt;float alpha=1;&lt;br /&gt;&lt;br /&gt;if (lambda&amp;lt;-lyapunovParams.cut_off) {&lt;br /&gt; lambda+=lyapunovParams.cut_off;&lt;br /&gt; float l=-lambda*lyapunovParams.factor;&lt;br /&gt; if (l&amp;lt;0)l=0;&lt;br /&gt; if (l&amp;gt;1)l=1;&lt;br /&gt; ptrCol[offset].x=l;&lt;br /&gt; ptrCol[offset].y=l;&lt;br /&gt; ptrCol[offset].z=l;&lt;br /&gt; ptrCol[offset].w=l;&lt;br /&gt;} else {&lt;br /&gt; ptrCol[offset].x=0;&lt;br /&gt; ptrCol[offset].y=0;&lt;br /&gt; ptrCol[offset].z=0;&lt;br /&gt; ptrCol[offset].w=0;&lt;br /&gt; ptrPos[offset].x=0;&lt;br /&gt; ptrPos[offset].y=0;&lt;br /&gt; ptrPos[offset].z=0;&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-9146160091390369389?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/9146160091390369389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2011/05/lyapunov-3d.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/9146160091390369389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/9146160091390369389'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2011/05/lyapunov-3d.html' title='Lyapunov 3D'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/--mcKOfDP8R4/Td2uudozroI/AAAAAAAAAT8/jo2bUUx0wAA/s72-c/Lyap3d.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-250320382873156355</id><published>2010-08-22T17:39:00.007+02:00</published><updated>2011-03-14T01:42:55.283+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wallpaper'/><category scheme='http://www.blogger.com/atom/ns#' term='tube'/><category scheme='http://www.blogger.com/atom/ns#' term='labyrinth'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><category scheme='http://www.blogger.com/atom/ns#' term='pipes'/><category scheme='http://www.blogger.com/atom/ns#' term='tubes'/><category scheme='http://www.blogger.com/atom/ns#' term='infinite'/><title type='text'>Infinite Pipes</title><content type='html'>&lt;a href="#"&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blk_1" style="display: inline;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;T&lt;/span&gt;oday I'm going to show a set of renders that extends the model of infinite labyrinths.&lt;br /&gt;&lt;br /&gt;To represent them it has been slightly modified the algorithm that represents the type of shape that a ray will encounter in a space region.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/THFFtqjVM_I/AAAAAAAAAS4/abYNLSs8qts/s1600/scene_infinitePipes-001.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/THFFtqjVM_I/AAAAAAAAAS4/abYNLSs8qts/s320/scene_infinitePipes-001.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5508260470069736434" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;The operation of this algoritm is very similar to the previously described to generate infinite labyrinths. It's presented now: We began with an object composed of two infinite planes separated by a arbitrary distance, let it be, for example a unit length. When a ray which its origin is outside the space contained between the two planes intersects with any of these two planes, an intersection position is computed. This position is a real vector. It's possible to take the X and Y coordinates (assuming that both planes cover a constant Z value) and covert it into integer coordinates (from now, j and i respectively). If the sum of this integer numbers is an even value one algorithm will be applied, if it's an odd value another algorithm will be applied. This is made in order to avoid adyacent regions share the same algorithm.&lt;br /&gt;The algorithm of the even regions is simple, a LCG type random number generator will use the j and i values in order to generate a boolean value. This boolean value will determinate if a straigt tube is place along X or Y direction. So if we randomly fill even regions with straight tubes that moves along random directions X or Y we got a constraint in order to choose a shape to fill the odd regions. So if the adjacent regions (sharing an edge) of an odd region got straight tubes in the Y direction, the shape of that odd region will be a Y direction tube. If the up and down region got a Y direction tube, and the left got another Y direction and the right a X direction tube, the shape will be a T.&lt;br /&gt;&lt;br /&gt;In order to achieve the effect of rusty it has been used a Perlin noise as a mask and then another configuration of Perlin noise for bumpmapping and color. To get the effect of water/ice it have been used a cellular fractal noise generator.&lt;br /&gt;&lt;br /&gt;Here we can see the same image without bumpmapping and color:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/THFFt3f8JRI/AAAAAAAAATA/d5F5o6XYN1I/s1600/scene_infinitePipes-004.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/THFFt3f8JRI/AAAAAAAAATA/d5F5o6XYN1I/s320/scene_infinitePipes-004.jpg" border="0" alt=""id="Img1" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Another view using a cylindrical camera:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/THFFuBfxrCI/AAAAAAAAATI/xAp0UVk_vTI/s1600/scene_infinitePipes-006.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/THFFuBfxrCI/AAAAAAAAATI/xAp0UVk_vTI/s320/scene_infinitePipes-006.jpg" border="0" alt=""id="Img2" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The same with texture and bumpmapping:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/THFFuQRLSAI/AAAAAAAAATQ/fl2klKJjAE8/s1600/scene_infinitePipes-007.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/THFFuQRLSAI/AAAAAAAAATQ/fl2klKJjAE8/s320/scene_infinitePipes-007.jpg" border="0" alt=""id="Img11" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finaly here, we can see another view from a high Z value. The shape reminds quite well a maze:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/THFFuvtteGI/AAAAAAAAATY/ocreuV7Om6A/s1600/scene_infinitePipes-008.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/THFFuvtteGI/AAAAAAAAATY/ocreuV7Om6A/s320/scene_infinitePipes-008.jpg" border="0" alt=""id="Img12" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blk_2" style="display: none;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;H&lt;/span&gt;oy voy a presentar una serie de renders que extienden el modelo de laberintos infinitos.&lt;br /&gt;&lt;br /&gt;Para representarlo se ha modificado ligeramente el algoritmo que determinaba el tipo de forma que se va a encontrar un rayo en una región del espacio.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/THFFtqjVM_I/AAAAAAAAAS4/abYNLSs8qts/s1600/scene_infinitePipes-001.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/THFFtqjVM_I/AAAAAAAAAS4/abYNLSs8qts/s320/scene_infinitePipes-001.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5508260470069736434" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;El funcionamiento de este algoritmo es muy similar al anteriormente descrito para laberintos infinitos. Se presenta a continuación. Se parte de un objeto compuesto por dos planos infinitos separados una distancia arbitraria, pongamos por ejemplo una unidad. Cuando un rayo cuyo origen está fuera del espacio comprendido entre los planos intersecta con alguno de los dos planos se determina la posición de impacto. Esta posición es un vector real. Se pueden tomar las coordenadas x e y (asumiendo que ambos planos cubren un valor Z constante) y convertirlas a coordenadas enteras (a partir de ahora j e i respectivamente). Si la suma de estos dos numeros enteros es un número par se aplicará un algoritmo y si es impar se aplicará otro. Esto se realiza para hacer que regiones cuadradas de espacio adyacentes no compartan el mismo algoritmo. De esta manera el algoritmo aplicado a las regiones de coordenadas impares dependerá de los valores computados para regiones pares adyacentes.&lt;br /&gt;El algoritmo de las regiones pares es sencillo, un generador de números aleatorios de tipo LCG utilizará los valroes j e i para producir un valor booleano. Este valor booleano determina si un tramo recto recorre la dirección X o la Y. Por lo tanto si rellenamos aleatoriamente el espacio de regiones pares de tramos rectos que recorren direcciones aleatorias tenemos una condición restrictiva para elegir las formas que ocuparán las regiones impares. Así por ejemplo si nos centramos en una región impar y las regiones pares adyacentes (por arista) contienen tramos rectos en la dirección Y, la forma de la región impar será un tramo en la dirección Y. Si arriba y abajo tiene un tramo en Y, a la izquierda en Y y a la derecha en X, la forma será una T.&lt;br /&gt;&lt;br /&gt;Para conseguir el efecto oxidado se ha utilizado ruido de perlin como máscara y posteriormente otra configuración de ruidl de Perlin para bumpmapping y color. Para conseguir el efecto del agua/hielo se ha utilizado un generador de ruido fractal celular.&lt;br /&gt;&lt;br /&gt;Aquí podemos ver la misma imagen sin el bumpmapping ni el color:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/THFFt3f8JRI/AAAAAAAAATA/d5F5o6XYN1I/s1600/scene_infinitePipes-004.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/THFFt3f8JRI/AAAAAAAAATA/d5F5o6XYN1I/s320/scene_infinitePipes-004.jpg" border="0" alt=""id="Img4" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Otra vista utilizando una cámara cilíndrica:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/THFFuBfxrCI/AAAAAAAAATI/xAp0UVk_vTI/s1600/scene_infinitePipes-006.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/THFFuBfxrCI/AAAAAAAAATI/xAp0UVk_vTI/s320/scene_infinitePipes-006.jpg" border="0" alt=""id="Img5" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;La misma con textura y bumpmapping:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/THFFuQRLSAI/AAAAAAAAATQ/fl2klKJjAE8/s1600/scene_infinitePipes-007.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/THFFuQRLSAI/AAAAAAAAATQ/fl2klKJjAE8/s320/scene_infinitePipes-007.jpg" border="0" alt=""id="Img6" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finalmente aquí, podemos ver otra vista desde un valor de Z alto. La forma recuerda bastante bien a un laberinto:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/THFFuvtteGI/AAAAAAAAATY/ocreuV7Om6A/s1600/scene_infinitePipes-008.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/THFFuvtteGI/AAAAAAAAATY/ocreuV7Om6A/s320/scene_infinitePipes-008.jpg" border="0" alt=""id="Img7" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-250320382873156355?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/250320382873156355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2010/08/infinite-pipes.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/250320382873156355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/250320382873156355'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2010/08/infinite-pipes.html' title='Infinite Pipes'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_mvoUye45cQc/THFFtqjVM_I/AAAAAAAAAS4/abYNLSs8qts/s72-c/scene_infinitePipes-001.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-7104409012646919680</id><published>2009-11-08T18:29:00.014+01:00</published><updated>2009-11-10T13:34:08.911+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='3D'/><category scheme='http://www.blogger.com/atom/ns#' term='wallpaper'/><category scheme='http://www.blogger.com/atom/ns#' term='House Of Stairs'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><category scheme='http://www.blogger.com/atom/ns#' term='cylindrical camera'/><category scheme='http://www.blogger.com/atom/ns#' term='escher'/><title type='text'>House Of Stairs</title><content type='html'>&lt;a href="#"&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blk_1" style="display: inline;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;T&lt;/span&gt;oday I'm going to show a set of renders that although they are not totally finished I would like to show.&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The target is the representation in 3D of the picture "&lt;a href="http://en.wikipedia.org/wiki/House_of_stairs"&gt;House Of Stairs&lt;/a&gt;" of &lt;a href="http://en.wikipedia.org/wiki/M._C._Escher"&gt;M.C.Escher&lt;/a&gt;. I focused the representation of walls and stairs. The strange animals and the doors are missing.&lt;br/&gt;&lt;br /&gt;The results are these, in black and white and in color:&lt;br /&gt;&lt;/div&gt;&lt;center&gt;&lt;table style="margin-left: 0px; margin-right: 0px;" border="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7R3SVUI/AAAAAAAAASU/szSExspNHjk/s1600-h/scene_HouseOfStairsTest5_09.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 128px; height: 320px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7R3SVUI/AAAAAAAAASU/szSExspNHjk/s320/scene_HouseOfStairsTest5_09.jpg" alt="" id="Img2" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7iFZx-I/AAAAAAAAASc/38WdgNTl0-I/s1600-h/scene_HouseOfStairsTest5_11.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 128px; height: 320px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7iFZx-I/AAAAAAAAASc/38WdgNTl0-I/s320/scene_HouseOfStairsTest5_11.jpg" alt="" id="Img1" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt;In the color version I have simply used blackbody illuminants with temperatures of 3000, 4000, 5000 and 7000 Kelvin.&lt;br /&gt;&lt;br /&gt;In order to make the renders we have to do this. It's necessary to model the scenery in such a way so the dimensions fit using whole units (fitting into a grid). So we make sure that all walls, walkways and stairs have similar widths. With any CAD program it's possible to model the scenery looking the original drawing. The objects at this point have box geometry.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SvcA7fE4VUI/AAAAAAAAASM/M0f0OdLEfkI/s1600-h/scene_HouseOfStairsTest3_01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 128px; height: 320px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SvcA7fE4VUI/AAAAAAAAASM/M0f0OdLEfkI/s320/scene_HouseOfStairsTest3_01.jpg" alt="" id="Img3" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Because the rendering of boxes is too dull we have to add some effects. One of those has to emulate the round shape of a stone. In order to achieve that we can use textures or 3D models. In this case I preferred using 3D models to achieve more quality. Accomplishing this is simple. We cubicate the scene with the same resolution of the design grid. Now we have a set of voxels. Each voxel is replaced by a rounded cube mesh shape. The only problem is the amount of data and so the high processing time.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SvcA7IBkdnI/AAAAAAAAASE/nL7FplzMAZ4/s1600-h/dullbox.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 314px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SvcA7IBkdnI/AAAAAAAAASE/nL7FplzMAZ4/s320/dullbox.jpg" alt="" id="Img5" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Later we apply a material to the surface. For that is used a composite material. The material is composed by one control map and two data maps. The control material is used to decide the amount of blending between the data materials. It's similar to an alpha blending. For the control map I have used a binary threshold discretized Perlin noise function. In the high part I have assigned one kind of bumpmap and in the lowest part another kind. So, two bumpmaps of controllable independent characteristics are obtained. Now we simply apply a greater scale factor and noise to one to look like holes in stone, while applying a smoother noise to the other. With only one bumpmap would have achieved a smoothed and polished stone effect with some holes. We don't want it.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7midQMI/AAAAAAAAASk/OFFNomZkOso/s1600-h/stonebox.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 288px; height: 320px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7midQMI/AAAAAAAAASk/OFFNomZkOso/s320/stonebox.jpg" alt="" id="BLOGGER_PHOTO_ID_5401787302011551938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finally to render it's used a cylindrical camera to emulate the curved effect of "The House of Stairs". With a little wise we can place the camera more or less the same position where Escher sat it.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blk_2" style="display: none;"&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;H&lt;/span&gt;oy voy a mostrar una serie de renders que aunque no están totalmente acabados me gustaría enseñar.&lt;br /&gt;El objetivo es la representación en 3D del dibujo "&lt;a href="http://en.wikipedia.org/wiki/House_of_stairs"&gt;Casa de Escaleras&lt;/a&gt;" de &lt;a href="http://en.wikipedia.org/wiki/M._C._Escher"&gt;M.C.Escher&lt;/a&gt;. Me he centrado en la representación de los muros y las escaleras. Faltan los animales extraños y las puertas.&lt;br/&gt;&lt;br /&gt;Los resultados son los siguientes, en blanco y negro y en color:&lt;br /&gt;&lt;/div&gt;&lt;center&gt;&lt;table style="margin-left: 0px; margin-right: 0px;" border="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7R3SVUI/AAAAAAAAASU/szSExspNHjk/s1600-h/scene_HouseOfStairsTest5_09.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 128px; height: 320px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7R3SVUI/AAAAAAAAASU/szSExspNHjk/s320/scene_HouseOfStairsTest5_09.jpg" alt="" id="Img2" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7iFZx-I/AAAAAAAAASc/38WdgNTl0-I/s1600-h/scene_HouseOfStairsTest5_11.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 128px; height: 320px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7iFZx-I/AAAAAAAAASc/38WdgNTl0-I/s320/scene_HouseOfStairsTest5_11.jpg" alt="" id="Img1" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt;Para la versión en color simplemente he utilizado iluminantes de cuerpo negro a temperaturas de 3000, 4000, 5000 y 7000 Kelvin.&lt;br /&gt;&lt;br /&gt;Para realizar los renders se parte de lo siguiente. Es necesario modelar un escenario de tal forma que las medidas se ajusten a unidades enteras (ajustado a un grid). Así nos aseguramos que todos los muros, pasarelas y escaleras tienen anchuras similares.&lt;br /&gt;Con cualquier programa de CAD se puede modelar el escenario fijándose bien en el dibujo original. Los objetos en este punto tienen una geometría de cajas.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SvcA7fE4VUI/AAAAAAAAASM/M0f0OdLEfkI/s1600-h/scene_HouseOfStairsTest3_01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 128px; height: 320px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SvcA7fE4VUI/AAAAAAAAASM/M0f0OdLEfkI/s320/scene_HouseOfStairsTest3_01.jpg" alt="" id="Img3" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cómo la renderización de cajas es muy sosa se han de añadir algunos efectos. Uno tiene que poder emular la forma redondeada de la piedra. Para ello se pueden utilizar texturas o modelos 3D. En este caso he preferido utilizar modelos 3D para obtener una mejor calidad. La realización de esto es sencilla. Se cubica la escena a la misma resolución que la del grid de diseño. Ahora tenemos un conjunto de vóxeles. Cada vóxel se sustituye por una malla en forma de cubo con bordes redondeados. El único problema de esto es la cantidad de datos y por lo tanto el tiempo elevado de proceso.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SvcA7IBkdnI/AAAAAAAAASE/nL7FplzMAZ4/s1600-h/dullbox.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 314px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SvcA7IBkdnI/AAAAAAAAASE/nL7FplzMAZ4/s320/dullbox.jpg" alt="" id="Img4" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Posteriormente se aplica un material a la superficie. Para ello se utiliza un material compuesto. El material se compone de un mapa de control y dos de datos. El mapa de control se utiliza para determinar la cantidad de mezcla de los materiales de datos. Similar a una mezcla alfa. Para el mapa de control he utilizado ruido de Perlin discretizado por un umbral binario. A la parte superior le aplico un tipo de bumpmap y a la parte inferior otro. Por lo que se obtienen dos bumpmaps de características controlables independientemente. Ahora simplemente se aplica un mayor factor de escala y ruido a uno para que parezcan agujeros en piedra, mientras que al otro un ruido mucho más suave. Con un solo mapa de bumpmap se habría conseguido un efecto de pierda lisa y pulida con algunos agujeros, cosa que no se quiere.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7midQMI/AAAAAAAAASk/OFFNomZkOso/s1600-h/stonebox.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 288px; height: 320px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7midQMI/AAAAAAAAASk/OFFNomZkOso/s320/stonebox.jpg" alt="" id="BLOGGER_PHOTO_ID_5401787302011551938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finalmente para la renderización se utiliza una cámara cilíndrica para emular el efecto de "La Casa de las Escaleras". Con un poco de tino se puede situar la cámara más o menos en la misma posición de dónde la situó Escher.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-7104409012646919680?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/7104409012646919680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/11/house-of-stairs.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/7104409012646919680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/7104409012646919680'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/11/house-of-stairs.html' title='House Of Stairs'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_mvoUye45cQc/SvcA7R3SVUI/AAAAAAAAASU/szSExspNHjk/s72-c/scene_HouseOfStairsTest5_09.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-8527095120447315989</id><published>2009-09-14T18:56:00.015+02:00</published><updated>2009-09-14T19:52:31.282+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='woman'/><category scheme='http://www.blogger.com/atom/ns#' term='wallpaper'/><category scheme='http://www.blogger.com/atom/ns#' term='labyrinth'/><category scheme='http://www.blogger.com/atom/ns#' term='maze'/><title type='text'>Spatial Labyrinths</title><content type='html'>&lt;a href="#"&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blk_1" style="display: inline;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;T&lt;/span&gt;oday I'm going to show a set of renders that I did some time ago. The general idea is to make a spatial maze.&lt;br /&gt;&lt;br /&gt;That is, one that allows movements upwards and downwards as well as forward, backward, right and left. The movements that a player can do are in any spatial axis. In this case, Theseus has to know how to climb well.&lt;br /&gt;&lt;br /&gt;One simple is this one:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq54EvBTjtI/AAAAAAAAAPs/aLAkPNlXg28/s1600-h/scene_cubic_lab_009.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq54EvBTjtI/AAAAAAAAAPs/aLAkPNlXg28/s320/scene_cubic_lab_009.jpg" alt="" id="BLOGGER_PHOTO_ID_5381370627491073746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;    In this one we see a tridimensional labyrinth bounded by the surface of a cube.&lt;br /&gt;&lt;br /&gt;   The procedure to accomplish this renders is not complex.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;We start from a tridimensional shape. Then it's discretized in voxels marking as active the ones that are partially or totally included in the volume defined by the surface of the figure.&lt;/li&gt;&lt;li&gt;Now we are going to discard the non active voxels and we work with the ones that intersect or are included inside the volume.&lt;/li&gt;&lt;li&gt;We start from a random voxel and we move in a random direction, marking as visited the currant voxel.&lt;/li&gt;&lt;li&gt;As we move through the voxels we can find a visited voxel in the chosen direction. In this case we chose another direction.&lt;/li&gt;&lt;li&gt;In the case that there are not any available directions we move backwards and we chose another direction.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The algorithm ends when all the nodes (voxels) have been visited.&lt;/li&gt;&lt;/ul&gt;    This algorithm allows a unique path from one point of the labyrinth to another. Obviously if we set two poins, one as starting and another one as ending, there will be a unique path between both, and then any other bifurcation that moves away from the path will bring us to a dead end.&lt;br /&gt;&lt;br /&gt;Other views of the cube:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq53AT435kI/AAAAAAAAAPE/woth8UkddYM/s1600-h/scene_cubic_lab_004.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq53AT435kI/AAAAAAAAAPE/woth8UkddYM/s320/scene_cubic_lab_004.jpg" alt="" id="Img11" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq53AwgbA_I/AAAAAAAAAPM/lFP6lUGwObs/s1600-h/scene_cubic_lab_005.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq53AwgbA_I/AAAAAAAAAPM/lFP6lUGwObs/s320/scene_cubic_lab_005.jpg" alt="" id="Img12" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/Sq54DtfVogI/AAAAAAAAAPU/KrgqXbe-4us/s1600-h/scene_cubic_lab_006.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/Sq54DtfVogI/AAAAAAAAAPU/KrgqXbe-4us/s320/scene_cubic_lab_006.jpg" alt="" id="Img13" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq54EJTi_kI/AAAAAAAAAPc/t_f8f19Kg0I/s1600-h/scene_cubic_lab_007.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq54EJTi_kI/AAAAAAAAAPc/t_f8f19Kg0I/s320/scene_cubic_lab_007.jpg" alt="" id="Img14" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/Sq54EftiQjI/AAAAAAAAAPk/EEqwaaTK5dE/s1600-h/scene_cubic_lab_008.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/Sq54EftiQjI/AAAAAAAAAPk/EEqwaaTK5dE/s320/scene_cubic_lab_008.jpg" alt="" id="Img15" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's possible to use other figures as a "mould" of the labyrinth.&lt;br /&gt;&lt;br /&gt;Here we can see a sphere:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq52Dv7ztwI/AAAAAAAAAOk/7c7b56PCrBA/s1600-h/scene_cubic_lab_000.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq52Dv7ztwI/AAAAAAAAAOk/7c7b56PCrBA/s320/scene_cubic_lab_000.jpg" alt="" id="Img2" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq52_dCxdLI/AAAAAAAAAOs/22jpMhnYy74/s1600-h/scene_cubic_lab_001.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq52_dCxdLI/AAAAAAAAAOs/22jpMhnYy74/s320/scene_cubic_lab_001.jpg" alt="" id="Img1" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And with a spherical camera:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq52_4dG6OI/AAAAAAAAAO0/p7ucT4HDLWk/s1600-h/scene_cubic_lab_002.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq52_4dG6OI/AAAAAAAAAO0/p7ucT4HDLWk/s320/scene_cubic_lab_002.jpg" alt="" id="Img16" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq53AEV2paI/AAAAAAAAAO8/SzuZesG8JOY/s1600-h/scene_cubic_lab_003.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq53AEV2paI/AAAAAAAAAO8/SzuZesG8JOY/s320/scene_cubic_lab_003.jpg" alt="" id="Img17" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Utah teapot:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq54FArgacI/AAAAAAAAAP0/Tyt0lNehO6o/s1600-h/scene_cubic_lab_010.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq54FArgacI/AAAAAAAAAP0/Tyt0lNehO6o/s320/scene_cubic_lab_010.jpg" alt="" id="Img21" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and a some renderings of a lying woman:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55BE5UFRI/AAAAAAAAAP8/4ANaxkirQUQ/s1600-h/scene_cubic_lab_011.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55BE5UFRI/AAAAAAAAAP8/4ANaxkirQUQ/s320/scene_cubic_lab_011.jpg" alt="" id="Img27" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55BgL-04I/AAAAAAAAAQE/hwNv5qA9cTI/s1600-h/scene_cubic_lab_012.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55BgL-04I/AAAAAAAAAQE/hwNv5qA9cTI/s320/scene_cubic_lab_012.jpg" alt="" id="Img26" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq55B28DS2I/AAAAAAAAAQM/mYNWAU740lM/s1600-h/scene_cubic_lab_013.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq55B28DS2I/AAAAAAAAAQM/mYNWAU740lM/s320/scene_cubic_lab_013.jpg" alt="" id="Img25" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55CCTw1cI/AAAAAAAAAQU/9J7KvEnDouU/s1600-h/scene_cubic_lab_014.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55CCTw1cI/AAAAAAAAAQU/9J7KvEnDouU/s320/scene_cubic_lab_014.jpg" alt="" id="Img24" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55CpbCbRI/AAAAAAAAAQc/n1PnXN7wGu0/s1600-h/scene_cubic_lab_015.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55CpbCbRI/AAAAAAAAAQc/n1PnXN7wGu0/s320/scene_cubic_lab_015.jpg" alt="" id="Img23" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq56R65G10I/AAAAAAAAAQk/T_NCbxNTe1k/s1600-h/scene_cubic_lab_016.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq56R65G10I/AAAAAAAAAQk/T_NCbxNTe1k/s320/scene_cubic_lab_016.jpg" alt="" id="Img22" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq56SZCshSI/AAAAAAAAAQs/fS9OMc-U53g/s1600-h/scene_cubic_lab_017.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq56SZCshSI/AAAAAAAAAQs/fS9OMc-U53g/s320/scene_cubic_lab_017.jpg" alt="" id="Img37" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq56S_033BI/AAAAAAAAAQ0/DuKCejz84-Q/s1600-h/scene_cubic_lab_018.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq56S_033BI/AAAAAAAAAQ0/DuKCejz84-Q/s320/scene_cubic_lab_018.jpg" alt="" id="Img36" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq56THOoSSI/AAAAAAAAAQ8/wfqrw6DI-WQ/s1600-h/scene_cubic_lab_019.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq56THOoSSI/AAAAAAAAAQ8/wfqrw6DI-WQ/s320/scene_cubic_lab_019.jpg" alt="" id="Img35" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/Sq56TrH9UPI/AAAAAAAAARE/TVbS5j3Otdo/s1600-h/scene_cubic_lab_020.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/Sq56TrH9UPI/AAAAAAAAARE/TVbS5j3Otdo/s320/scene_cubic_lab_020.jpg" alt="" id="Img34" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blk_2" style="display: none;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;H&lt;/span&gt;oy voy a mostrar una serie de renders que hice hace poco. La idea general es realizar un laberinto espacial. &lt;br /&gt;&lt;br /&gt;Esto es, que permita movimentos hacia arriba y hacia abajo además de adelante, atrás, derecha e izquierda. Los movimientos que puede efectuar un jugador serían en cualquier eje espacial. En este caso Teseo deberá saber escalar bien.&lt;br /&gt;&lt;br /&gt;Un ejemplo es el siguiente:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq54EvBTjtI/AAAAAAAAAPs/aLAkPNlXg28/s1600-h/scene_cubic_lab_009.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq54EvBTjtI/AAAAAAAAAPs/aLAkPNlXg28/s320/scene_cubic_lab_009.jpg" alt="" id="Img3" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;En éste vemos un laberinto tridimensional acotado por la superficie de un cubo.&lt;br /&gt;&lt;br /&gt;Para realizar estos renders el procedimiento no es complicado.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Se parte de una figura tridimensional.Se discretiza en vóxeles marcando como vóxel activo un voxel que está parcial o totalmente incluido en el volumen definido por la superficie de la figura.&lt;/li&gt;&lt;li&gt;A partir de ahora vamos a descartar los vóxeles no activos y trabajamos con aquellos que intersectan o están incluidos en el volumen.&lt;/li&gt;&lt;li&gt;Partimos de un vóxel aleatorio y nos movemos en una dirección aleatoria, marcando éste vóxel como visitado.&lt;/li&gt;&lt;li&gt;A medida que avanzamos nos podemos encontrar con un voxel ya visitado en la dirección elegida. En este caso elegimos otra dirección.&lt;/li&gt;&lt;li&gt;En el caso de no existan direcciones disponibles, damos un paso hacia atrás (backtracking) y repetimos el proceso.&lt;/li&gt;&lt;li&gt;El algoritmo finaliza cuando hemos visitado todos los nodos activos.&lt;/li&gt;&lt;/ul&gt;Este algoritmo permite un camino único desde un punto del laberinto hasta cualquier otro. Obviamente si fijamos dos puntos, uno de comienzo y otro de fin, existirá un camino único, y por lo tanto cualquier bifurcación que se separe de dicha ruta llevará a un extremo sin salida.&lt;br /&gt;&lt;br /&gt;Otras vistas del cubo:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq53AT435kI/AAAAAAAAAPE/woth8UkddYM/s1600-h/scene_cubic_lab_004.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq53AT435kI/AAAAAAAAAPE/woth8UkddYM/s320/scene_cubic_lab_004.jpg" alt="" id="Img6" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq53AwgbA_I/AAAAAAAAAPM/lFP6lUGwObs/s1600-h/scene_cubic_lab_005.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq53AwgbA_I/AAAAAAAAAPM/lFP6lUGwObs/s320/scene_cubic_lab_005.jpg" alt="" id="Img7" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/Sq54DtfVogI/AAAAAAAAAPU/KrgqXbe-4us/s1600-h/scene_cubic_lab_006.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/Sq54DtfVogI/AAAAAAAAAPU/KrgqXbe-4us/s320/scene_cubic_lab_006.jpg" alt="" id="Img8" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq54EJTi_kI/AAAAAAAAAPc/t_f8f19Kg0I/s1600-h/scene_cubic_lab_007.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq54EJTi_kI/AAAAAAAAAPc/t_f8f19Kg0I/s320/scene_cubic_lab_007.jpg" alt="" id="Img9" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/Sq54EftiQjI/AAAAAAAAAPk/EEqwaaTK5dE/s1600-h/scene_cubic_lab_008.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/Sq54EftiQjI/AAAAAAAAAPk/EEqwaaTK5dE/s320/scene_cubic_lab_008.jpg" alt="" id="Img10" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Se pueden utilizar otras figuras como "molde" del laberinto&lt;br /&gt;&lt;br /&gt;Aquí vemos una esfera:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq52Dv7ztwI/AAAAAAAAAOk/7c7b56PCrBA/s1600-h/scene_cubic_lab_000.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq52Dv7ztwI/AAAAAAAAAOk/7c7b56PCrBA/s320/scene_cubic_lab_000.jpg" alt="" id="Img5" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq52_dCxdLI/AAAAAAAAAOs/22jpMhnYy74/s1600-h/scene_cubic_lab_001.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq52_dCxdLI/AAAAAAAAAOs/22jpMhnYy74/s320/scene_cubic_lab_001.jpg" alt="" id="Img4" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Y con una cámara esférica:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq52_4dG6OI/AAAAAAAAAO0/p7ucT4HDLWk/s1600-h/scene_cubic_lab_002.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq52_4dG6OI/AAAAAAAAAO0/p7ucT4HDLWk/s320/scene_cubic_lab_002.jpg" alt="" id="Img18" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq53AEV2paI/AAAAAAAAAO8/SzuZesG8JOY/s1600-h/scene_cubic_lab_003.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq53AEV2paI/AAAAAAAAAO8/SzuZesG8JOY/s320/scene_cubic_lab_003.jpg" alt="" id="Img19" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;La tetera de Utah:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq54FArgacI/AAAAAAAAAP0/Tyt0lNehO6o/s1600-h/scene_cubic_lab_010.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq54FArgacI/AAAAAAAAAP0/Tyt0lNehO6o/s320/scene_cubic_lab_010.jpg" alt="" id="Img20" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Y unas representaciones de una mujer tumbada:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55BE5UFRI/AAAAAAAAAP8/4ANaxkirQUQ/s1600-h/scene_cubic_lab_011.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55BE5UFRI/AAAAAAAAAP8/4ANaxkirQUQ/s320/scene_cubic_lab_011.jpg" alt="" id="Img28" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55BgL-04I/AAAAAAAAAQE/hwNv5qA9cTI/s1600-h/scene_cubic_lab_012.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55BgL-04I/AAAAAAAAAQE/hwNv5qA9cTI/s320/scene_cubic_lab_012.jpg" alt="" id="Img29" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq55B28DS2I/AAAAAAAAAQM/mYNWAU740lM/s1600-h/scene_cubic_lab_013.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq55B28DS2I/AAAAAAAAAQM/mYNWAU740lM/s320/scene_cubic_lab_013.jpg" alt="" id="Img30" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55CCTw1cI/AAAAAAAAAQU/9J7KvEnDouU/s1600-h/scene_cubic_lab_014.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55CCTw1cI/AAAAAAAAAQU/9J7KvEnDouU/s320/scene_cubic_lab_014.jpg" alt="" id="Img31" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55CpbCbRI/AAAAAAAAAQc/n1PnXN7wGu0/s1600-h/scene_cubic_lab_015.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq55CpbCbRI/AAAAAAAAAQc/n1PnXN7wGu0/s320/scene_cubic_lab_015.jpg" alt="" id="Img32" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq56R65G10I/AAAAAAAAAQk/T_NCbxNTe1k/s1600-h/scene_cubic_lab_016.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq56R65G10I/AAAAAAAAAQk/T_NCbxNTe1k/s320/scene_cubic_lab_016.jpg" alt="" id="Img33" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/Sq56SZCshSI/AAAAAAAAAQs/fS9OMc-U53g/s1600-h/scene_cubic_lab_017.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/Sq56SZCshSI/AAAAAAAAAQs/fS9OMc-U53g/s320/scene_cubic_lab_017.jpg" alt="" id="Img38" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/Sq56S_033BI/AAAAAAAAAQ0/DuKCejz84-Q/s1600-h/scene_cubic_lab_018.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/Sq56S_033BI/AAAAAAAAAQ0/DuKCejz84-Q/s320/scene_cubic_lab_018.jpg" alt="" id="Img39" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/Sq56THOoSSI/AAAAAAAAAQ8/wfqrw6DI-WQ/s1600-h/scene_cubic_lab_019.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/Sq56THOoSSI/AAAAAAAAAQ8/wfqrw6DI-WQ/s320/scene_cubic_lab_019.jpg" alt="" id="Img40" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/Sq56TrH9UPI/AAAAAAAAARE/TVbS5j3Otdo/s1600-h/scene_cubic_lab_020.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/Sq56TrH9UPI/AAAAAAAAARE/TVbS5j3Otdo/s320/scene_cubic_lab_020.jpg" alt="" id="Img41" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-8527095120447315989?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/8527095120447315989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/09/spatial-labyrinths.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/8527095120447315989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/8527095120447315989'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/09/spatial-labyrinths.html' title='Spatial Labyrinths'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_mvoUye45cQc/Sq54EvBTjtI/AAAAAAAAAPs/aLAkPNlXg28/s72-c/scene_cubic_lab_009.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-7085129778961078487</id><published>2009-08-02T18:11:00.014+02:00</published><updated>2009-08-12T10:27:16.254+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='infinity'/><category scheme='http://www.blogger.com/atom/ns#' term='spherical lens'/><category scheme='http://www.blogger.com/atom/ns#' term='labyrinth'/><category scheme='http://www.blogger.com/atom/ns#' term='maze'/><category scheme='http://www.blogger.com/atom/ns#' term='infinite'/><category scheme='http://www.blogger.com/atom/ns#' term='escher'/><title type='text'>Spherical Renders of Labyrinths</title><content type='html'>&lt;a href="#"&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blk_1" style="display: inline;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;R&lt;/span&gt;ecently I was thinking about how one of the mazes that I programmed would it seen using a spherical lens. Spherical lens deform parts of the images that are away from center, so the things that are far away looks like further away indeed. So more things "fits" inside the image.&lt;br /&gt;When the deformation is low the result is similar to a wide angle lens. When the deformation is high we get images more dificult to achieve in reality. When the deformation is very high the images are imposible to obtain in reality.&lt;br /&gt;The code that generates a particular ray for a pixel can be coded like this:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Ray RayGenerator::GenerateRay(int pixel_x, int pixel_y)&lt;br /&gt;{&lt;br /&gt;Ray ray;&lt;br /&gt;double u,v;&lt;br /&gt;&lt;br /&gt;ConvertPixel_to_Unit(pixel_x,pixel_y,u,v);&lt;br /&gt;&lt;br /&gt;ray.orig=From;&lt;br /&gt;ray.dir=-Normalize3d(-i + u*tanFov*aspect*j + v*tanFov*k);&lt;br /&gt;&lt;br /&gt;return ray;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This code generates rays that advance in the negative direction of the X axis&lt;br /&gt;&lt;br /&gt;Slightly modifying the code we can obtain our new spherical camera:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Ray SphericalRayGenerator::GenerateRay(int pixel_x, int pixel_y)&lt;br /&gt;{&lt;br /&gt;Ray ray;&lt;br /&gt;double u,v;&lt;br /&gt;&lt;br /&gt;ConvertPixel_to_Unit(pixel_x,pixel_y,u,v);&lt;br /&gt;&lt;br /&gt;u*=fishEyeFactor*aspect;&lt;br /&gt;v*=fishEyeFactor;&lt;br /&gt;&lt;br /&gt;Vector V;&lt;br /&gt;double r=sqrt(u*u+v*v);&lt;br /&gt;&lt;br /&gt;double a=atan2(v,u);&lt;br /&gt;V.y=sin(a)*(1-cos(r));&lt;br /&gt;V.z=-cos(a)*(1-cos(r));&lt;br /&gt;V.x=sin(r);&lt;br /&gt;V=Normalize3d(V);&lt;br /&gt;&lt;br /&gt;Matrix matrix=Construct4d(i,j,k,VECTOR3D(0,0,0));&lt;br /&gt;V=TransformVector3d(V,matrix);&lt;br /&gt;&lt;br /&gt;ray.orig=From;&lt;br /&gt;ray.dir=Normalize3d(V);&lt;br /&gt;&lt;br /&gt;return ray;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This type of projection generates a pole (or singularity) in the positive direction of the X axis. This generates images wery similar to the ones that &lt;a href="http://en.wikipedia.org/wiki/M._C._Escher"&gt;Escher&lt;/a&gt; made in Circle Limit. As we aproach to the horizon we go to infinity.&lt;br /&gt;With the value 'fishEyeFactor' we replicate the plane several times over the sphere reaching infinity as concentrical circular shapes.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This image is a normal render of an infinite labyrinth:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SnXMlF1zhmI/AAAAAAAAANs/D6GlIBQ93dY/s1600-h/scene_infiniteLab_bird_eye%5Bnormal%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SnXMlF1zhmI/AAAAAAAAANs/D6GlIBQ93dY/s320/scene_infiniteLab_bird_eye%5Bnormal%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365419468676892258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As we increase the spherical factor we slightly deform the image:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SnXMlrjfh5I/AAAAAAAAAN8/2xVi8Z7FOGU/s1600-h/scene_infiniteLab_bird_eye%5Bspherical%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SnXMlrjfh5I/AAAAAAAAAN8/2xVi8Z7FOGU/s320/scene_infiniteLab_bird_eye%5Bspherical%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365419478800631698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If we increase too much the factor we reach infinity several times:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SnXPPtGYa3I/AAAAAAAAAOM/ogzTFydMZF8/s1600-h/scene_infiniteLab_bird_eye%5Bspherical2%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SnXPPtGYa3I/AAAAAAAAAOM/ogzTFydMZF8/s320/scene_infiniteLab_bird_eye%5Bspherical2%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365422399793163122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We can make a render looking "down" obtaining an image that remainds quite well to the ones of&lt;a href="http://en.wikipedia.org/wiki/M._C._Escher"&gt; M.C.Escher&lt;/a&gt;:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SnXMlOodQ4I/AAAAAAAAANk/gw4WlyBME9o/s1600-h/scene_infiniteLab_bird_eye%5Bball%5D%5BR%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SnXMlOodQ4I/AAAAAAAAANk/gw4WlyBME9o/s320/scene_infiniteLab_bird_eye%5Bball%5D%5BR%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365419471036826498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Likewise it's possible to increase the spherical factor:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SnXPPZ2EZGI/AAAAAAAAAOE/v-nNHHOeH0A/s1600-h/scene_infiniteLab_bird_eye%5Bball2%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SnXPPZ2EZGI/AAAAAAAAAOE/v-nNHHOeH0A/s320/scene_infiniteLab_bird_eye%5Bball2%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365422394624468066" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blk_2" style="display: none;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;H&lt;/span&gt;ace poco estuve pensando cómo se vería uno de los laberintos infinitos que programé bajo una lente esférica. Las lentes esféricas deforman partes de la imagen que se alejan del centro de ésta, haciendo que lo que está más lejos aparezca más lejos todavía. Así "entran" más cosas en la imagen.&lt;br /&gt;Cuando la deformación es baja el resultado es similar a lentes de gran angular. Cuando la deformación es alta tenemos imágenes que son más difíciles de obtener en la realidad. Si la deformación es muy alta, las imagénes son imposibles de obtener en la realidad.&lt;br /&gt;El código que genera un rayo para un pixel determinado se puede codificar así:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Ray RayGenerator::GenerateRay(int pixel_x, int pixel_y)&lt;br /&gt;{&lt;br /&gt;Ray ray;&lt;br /&gt;double u,v;&lt;br /&gt;&lt;br /&gt;ConvertPixel_to_Unit(pixel_x,pixel_y,u,v);&lt;br /&gt;&lt;br /&gt;ray.orig=From;&lt;br /&gt;ray.dir=-Normalize3d(-i + u*tanFov*aspect*j + v*tanFov*k);&lt;br /&gt;&lt;br /&gt;return ray;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Este código genera rayos que avanzan en la dirección negativa del eje X.&lt;br /&gt;&lt;br /&gt;Modificando ligeramente el código anterior podemos obtener nuestra cámara esférica:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Ray SphericalRayGenerator::GenerateRay(int pixel_x, int pixel_y)&lt;br /&gt;{&lt;br /&gt;Ray ray;&lt;br /&gt;double u,v;&lt;br /&gt;&lt;br /&gt;ConvertPixel_to_Unit(pixel_x,pixel_y,u,v);&lt;br /&gt;&lt;br /&gt;u*=fishEyeFactor*aspect;&lt;br /&gt;v*=fishEyeFactor;&lt;br /&gt;&lt;br /&gt;Vector V;&lt;br /&gt;double r=sqrt(u*u+v*v);&lt;br /&gt;&lt;br /&gt;double a=atan2(v,u);&lt;br /&gt;V.y=sin(a)*(1-cos(r));&lt;br /&gt;V.z=-cos(a)*(1-cos(r));&lt;br /&gt;V.x=sin(r);&lt;br /&gt;V=Normalize3d(V);&lt;br /&gt;&lt;br /&gt;Matrix matrix=Construct4d(i,j,k,VECTOR3D(0,0,0));&lt;br /&gt;V=TransformVector3d(V,matrix);&lt;br /&gt;&lt;br /&gt;ray.orig=From;&lt;br /&gt;ray.dir=Normalize3d(V);&lt;br /&gt;&lt;br /&gt;return ray;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Este tipo de proyección genera un polo (o singularidad) en la dirección positiva de las X. Esto genera imágenes muy similares a las que Escher realizaba en Límite Circular (Circle Limit). A medida que nos acercamos al horizonte nos vamos hasta infinito.&lt;br /&gt;Con el valor 'fishEyeFactor' "replicamos" el plano varias veces sobre la esfera encontrando el infinito en forma de círculos concéntricos.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Esta imagen es un render normal de un laberinto infinito:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SnXMlF1zhmI/AAAAAAAAANs/D6GlIBQ93dY/s1600-h/scene_infiniteLab_bird_eye%5Bnormal%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SnXMlF1zhmI/AAAAAAAAANs/D6GlIBQ93dY/s320/scene_infiniteLab_bird_eye%5Bnormal%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365419468676892258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A medida que aumentamos el factor esférico deformamos la imagen ligeramente:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SnXMlrjfh5I/AAAAAAAAAN8/2xVi8Z7FOGU/s1600-h/scene_infiniteLab_bird_eye%5Bspherical%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SnXMlrjfh5I/AAAAAAAAAN8/2xVi8Z7FOGU/s320/scene_infiniteLab_bird_eye%5Bspherical%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365419478800631698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Si aumentamos demasiado el factor alcanzamos el infinito varias veces:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SnXPPtGYa3I/AAAAAAAAAOM/ogzTFydMZF8/s1600-h/scene_infiniteLab_bird_eye%5Bspherical2%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SnXPPtGYa3I/AAAAAAAAAOM/ogzTFydMZF8/s320/scene_infiniteLab_bird_eye%5Bspherical2%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365422399793163122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Podemos realizar un render mirando hacia "abajo" obteniendo una imagen que recuerda bastante a las de &lt;a href="http://es.wikipedia.org/wiki/Maurits_Cornelis_Escher"&gt; M.C.Escher&lt;/a&gt;:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SnXMlOodQ4I/AAAAAAAAANk/gw4WlyBME9o/s1600-h/scene_infiniteLab_bird_eye%5Bball%5D%5BR%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SnXMlOodQ4I/AAAAAAAAANk/gw4WlyBME9o/s320/scene_infiniteLab_bird_eye%5Bball%5D%5BR%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365419471036826498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Se puede igualmente aumentar el factor esférico:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SnXPPZ2EZGI/AAAAAAAAAOE/v-nNHHOeH0A/s1600-h/scene_infiniteLab_bird_eye%5Bball2%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SnXPPZ2EZGI/AAAAAAAAAOE/v-nNHHOeH0A/s320/scene_infiniteLab_bird_eye%5Bball2%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5365422394624468066" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-7085129778961078487?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/7085129778961078487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/08/spherical-renders-of-labyrinths.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/7085129778961078487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/7085129778961078487'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/08/spherical-renders-of-labyrinths.html' title='Spherical Renders of Labyrinths'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_mvoUye45cQc/SnXMlF1zhmI/AAAAAAAAANs/D6GlIBQ93dY/s72-c/scene_infiniteLab_bird_eye%5Bnormal%5D.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-1175419216629975646</id><published>2009-04-26T16:58:00.011+02:00</published><updated>2009-08-12T10:42:13.540+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='topmod'/><category scheme='http://www.blogger.com/atom/ns#' term='topologic'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><title type='text'>Top Mod 3D Images</title><content type='html'>&lt;a href="#"&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;div id="blk_1" class="blk_1" style="display: inline;"&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;T&lt;/span&gt;oday i'm going to upload a set of renders that I did recently with a fantastic topological modelling program. The program's name is TopMod3D. Although the figure may seem complicated, thanks to this program are simple to perform.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR3z3kETcI/AAAAAAAAAKI/kfJA1LBHWto/s1600-h/sceneTopoTest-00.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR3z3kETcI/AAAAAAAAAKI/kfJA1LBHWto/s320/sceneTopoTest-00.jpg" alt="" id="Img10" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Using a white skydome.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SfR71WvPG3I/AAAAAAAAALg/HC4wfbKwpmk/s1600-h/sceneTopoTest-01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SfR71WvPG3I/AAAAAAAAALg/HC4wfbKwpmk/s320/sceneTopoTest-01.jpg" alt="" id="Img11" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Using a blue skydome.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30HrS4TI/AAAAAAAAAKY/4hDr4283zXk/s1600-h/sceneTopoTest-02.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30HrS4TI/AAAAAAAAAKY/4hDr4283zXk/s320/sceneTopoTest-02.jpg" alt="" id="Img12" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Using a blue skydome and a lightsource.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30RbFppI/AAAAAAAAAKg/-jvGLDCmr-0/s1600-h/sceneTopoTest-03.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30RbFppI/AAAAAAAAAKg/-jvGLDCmr-0/s320/sceneTopoTest-03.jpg" alt="" id="Img13" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The figure uses a phong material with a high phong exponent.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30nUodRI/AAAAAAAAAKo/VK5j528JppM/s1600-h/sceneTopoTest-04.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30nUodRI/AAAAAAAAAKo/VK5j528JppM/s320/sceneTopoTest-04.jpg" alt="" id="Img14" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Set of two objects: A box defined with a phong material and a totaly lambertian figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5Cmpd5BI/AAAAAAAAAKw/AwRTq7xpOAA/s1600-h/sceneTopoTest-05.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5Cmpd5BI/AAAAAAAAAKw/AwRTq7xpOAA/s320/sceneTopoTest-05.jpg" alt="" id="Img15" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The figure's material simulates a laquer phong coating.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5CyJU-1I/AAAAAAAAAK4/HyxKrPjYDqQ/s1600-h/sceneTopoTest-06.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5CyJU-1I/AAAAAAAAAK4/HyxKrPjYDqQ/s320/sceneTopoTest-06.jpg" alt="" id="Img16" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Material with bumpmapping for the box.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SfR5CzazruI/AAAAAAAAALA/4uM4ZFqGXiM/s1600-h/sceneTopoTest-07.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SfR5CzazruI/AAAAAAAAALA/4uM4ZFqGXiM/s320/sceneTopoTest-07.jpg" alt="" id="Img17" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Changing the floor's material so a shadow can be appearing (adding a diffuse component)&lt;br /&gt;  &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5DOSL3pI/AAAAAAAAALI/3c4wrCIX00Q/s1600-/sceneTopoTest-08.jpg"&gt;&lt;br /&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5DOSL3pI/AAAAAAAAALI/3c4wrCIX00Q/s320/sceneTopoTest-08.jpg" alt="" id="Img18" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A high contrast image with a front lightsource.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5DKvDvVI/AAAAAAAAALQ/kMWKZjckzMY/s1600-h/sceneTopoTest-09.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5DKvDvVI/AAAAAAAAALQ/kMWKZjckzMY/s320/sceneTopoTest-09.jpg" alt="" id="Img19" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A high contrast image with a rear lightsource.&lt;br /&gt;&lt;/div&gt;&lt;div id="blk_2" class="blk_2" style="display: none;"&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;H&lt;/span&gt;oy voy a subir un conjunto de renders que hice hace poco con un fantástico programa de modelado topológico. El progama se llama TopMod3D. Aunque la figura parezca complicada, gracias a este programa  son sencillas de realizar.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR3z3kETcI/AAAAAAAAAKI/kfJA1LBHWto/s1600-h/sceneTopoTest-00.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR3z3kETcI/AAAAAAAAAKI/kfJA1LBHWto/s320/sceneTopoTest-00.jpg" alt="" id="BLOGGER_PHOTO_ID_5329015992058400194" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Utilizando un skydome blanco.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SfR71WvPG3I/AAAAAAAAALg/HC4wfbKwpmk/s1600-h/sceneTopoTest-01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SfR71WvPG3I/AAAAAAAAALg/HC4wfbKwpmk/s320/sceneTopoTest-01.jpg" alt="" id="Img9" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Utilizando un skydome azul.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30HrS4TI/AAAAAAAAAKY/4hDr4283zXk/s1600-h/sceneTopoTest-02.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30HrS4TI/AAAAAAAAAKY/4hDr4283zXk/s320/sceneTopoTest-02.jpg" alt="" id="Img1" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Utilizando un skydome azul y una fuente de luz.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30RbFppI/AAAAAAAAAKg/-jvGLDCmr-0/s1600-h/sceneTopoTest-03.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30RbFppI/AAAAAAAAAKg/-jvGLDCmr-0/s320/sceneTopoTest-03.jpg" alt="" id="Img2" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;La figura utiliza un material de phong con un exponente alto (1024).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30nUodRI/AAAAAAAAAKo/VK5j528JppM/s1600-h/sceneTopoTest-04.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SfR30nUodRI/AAAAAAAAAKo/VK5j528JppM/s320/sceneTopoTest-04.jpg" alt="" id="Img3" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Conjunto de dos objetos: Una caja definida con un material de phong y la figura totalmente lambertiana.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5Cmpd5BI/AAAAAAAAAKw/AwRTq7xpOAA/s1600-h/sceneTopoTest-05.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5Cmpd5BI/AAAAAAAAAKw/AwRTq7xpOAA/s320/sceneTopoTest-05.jpg" alt="" id="Img4" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;El material de la figura simula una pintura de phong lacada.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5CyJU-1I/AAAAAAAAAK4/HyxKrPjYDqQ/s1600-h/sceneTopoTest-06.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5CyJU-1I/AAAAAAAAAK4/HyxKrPjYDqQ/s320/sceneTopoTest-06.jpg" alt="" id="Img5" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Material con bumpmapping para la caja.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SfR5CzazruI/AAAAAAAAALA/4uM4ZFqGXiM/s1600-h/sceneTopoTest-07.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SfR5CzazruI/AAAAAAAAALA/4uM4ZFqGXiM/s320/sceneTopoTest-07.jpg" alt="" id="Img6" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Cambiado el material del suelo para que aparezca sombra (al añadir una componente difusa).&lt;br /&gt;  &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5DOSL3pI/AAAAAAAAALI/3c4wrCIX00Q/s1600-/sceneTopoTest-08.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5DOSL3pI/AAAAAAAAALI/3c4wrCIX00Q/s320/sceneTopoTest-08.jpg" alt="" id="Img7" border="0" /&gt;&lt;br /&gt;Una imagen de alto contraste con luz frontal.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5DKvDvVI/AAAAAAAAALQ/kMWKZjckzMY/s1600-h/sceneTopoTest-09.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SfR5DKvDvVI/AAAAAAAAALQ/kMWKZjckzMY/s320/sceneTopoTest-09.jpg" alt="" id="Img8" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Una imagen de alto contraste con luz trasera.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-1175419216629975646?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/1175419216629975646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/04/top-mod-3d-images.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/1175419216629975646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/1175419216629975646'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/04/top-mod-3d-images.html' title='Top Mod 3D Images'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_mvoUye45cQc/SfR3z3kETcI/AAAAAAAAAKI/kfJA1LBHWto/s72-c/sceneTopoTest-00.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-6849801186557342309</id><published>2009-02-05T18:10:00.017+01:00</published><updated>2009-07-23T14:30:02.076+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wallpaper'/><category scheme='http://www.blogger.com/atom/ns#' term='labyrinth'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><category scheme='http://www.blogger.com/atom/ns#' term='maze'/><category scheme='http://www.blogger.com/atom/ns#' term='infinite'/><title type='text'>Infinite Labyrinths</title><content type='html'>&lt;a href='#'&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='#'&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;div id="blk_1" class="blk_1" style="display: inline;"&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;I&lt;/span&gt;n a previous article (Truchet Tilings) I showed a way to represent labyrinths in a sphere and at the end, in a plane. In this one I'm going to show a way to represent infinite labyrinths in a plane.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;Usually these labyrinths are finite sets of triangles. One of the problems in this type of representations is that you can see boundings.&lt;br /&gt;&lt;br /&gt;One way to solve this is replicating the figure. Sooner or later you'll be able to see a periodic shape, noticing an artificial behaviour.&lt;br /&gt;&lt;br /&gt;So, if you want to show infinite labyrinths, you'll have to find a method that satisfy these conditions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Covers all the visible domain.&lt;/li&gt;&lt;li&gt;Absence of periodicity in the image.&lt;/li&gt;&lt;/ul&gt;The way that I present here in order to do this task is the next one:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Split the plane (in an algorithmic manner) in square regions of unit size (a grid of infinite squares, each one with one unit of side length).&lt;/li&gt;&lt;li&gt;Asign to each square region a tridimensional figure (for example, a wall in a side).&lt;/li&gt;&lt;/ul&gt;When a ray step inside a region, it will intersect with the associated shape in that region. When, by reflexion or traversing, it changes the region, a new intersection will be computed with the new form associated to the new region.&lt;br /&gt;&lt;br /&gt;Here I show a sample using always the same shape.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SYsfWejRqlI/AAAAAAAAAIk/NUrSnWDMIWg/s1600-h/scene_plane_standard.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SYsfWejRqlI/AAAAAAAAAIk/NUrSnWDMIWg/s320/scene_plane_standard.jpg" alt="" id="BLOGGER_PHOTO_ID_5299363857550125650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsfWRxLw0I/AAAAAAAAAIs/1EcyFPP0IQc/s1600-h/scene_plane_cylindrical.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsfWRxLw0I/AAAAAAAAAIs/1EcyFPP0IQc/s320/scene_plane_cylindrical.jpg" alt="" id="BLOGGER_PHOTO_ID_5299363854118798146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This method presents a set of decissions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;How many types of shape should I use.&lt;/li&gt;&lt;li&gt;How I assign to each region a concrete shape.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The first point is chosen by the user. For example, my set of shapes will be:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A wall of 0.1 units width and 1 unit length arranged in a north face of the region.&lt;/li&gt;&lt;li&gt;Another similar wall arranged in the west face.&lt;/li&gt;&lt;/ul&gt;For the second point we have to think a bit. To each coordinate (integer) of the space I have to assign a random number. The function will be f(i,j)-&gt;n. Being i and j integer numbers and n a real number from 0 to 1. This function has to return values highly distinct of 'n' using slight variations of i and j. This is either a hashing function or a pseudorandom generator. Esentially are the same.&lt;br /&gt;The generator will be a LCM (Linear Congruent Method) generator. We run the risk of having the Marsaglia effect. It will appear, and the user might see a certain periodicity but will be very dificutl to distinguish.&lt;br /&gt;&lt;br /&gt;Each shape has a certain probability for appearing (for example: 1/number_of_figures). It will choose the figure using the method of the Russian roulette depending on the generated random number. As the number is pseudorandom and depends on the input paramaters, it always return the same value for the same input parameters.&lt;br /&gt;&lt;br /&gt;The results are these:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SYsgSr5dJAI/AAAAAAAAAI0/G5Yk23tFtjY/s1600-h/scene_infiniteLab_standard_type_0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SYsgSr5dJAI/AAAAAAAAAI0/G5Yk23tFtjY/s320/scene_infiniteLab_standard_type_0.jpg" alt="" id="BLOGGER_PHOTO_ID_5299364891924964354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And with a different probability distribution:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SYsgSmn7VFI/AAAAAAAAAI8/bdfJFFxZV0s/s1600-h/scene_infiniteLab_standard_type_0_prob.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SYsgSmn7VFI/AAAAAAAAAI8/bdfJFFxZV0s/s320/scene_infiniteLab_standard_type_0_prob.jpg" alt="" id="BLOGGER_PHOTO_ID_5299364890509268050" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As you can see, choosing this kind of figures, as the norwest corner is always occupied, the aspect seems to be a growing figures in the same direction.&lt;br /&gt;&lt;br /&gt;It can be resolved by adding another figure that is a double wall south and east. So using this way the distribution of corners is uniform and doesn't seem to grow in any direction. Althoug this adds more holes and makes the maze looks more closed.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SYsg35kGQ5I/AAAAAAAAAJM/y1ts4DiHXHM/s1600-h/scene_infiniteLab_standard_type_3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SYsg35kGQ5I/AAAAAAAAAJM/y1ts4DiHXHM/s320/scene_infiniteLab_standard_type_3.jpg" alt="" id="BLOGGER_PHOTO_ID_5299365531248640914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is with a figure with a column in the middle of the region:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SYsg36TyN_I/AAAAAAAAAJE/ZPy6gIB1EAM/s1600-h/scene_infiniteLab_standard_type_2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SYsg36TyN_I/AAAAAAAAAJE/ZPy6gIB1EAM/s320/scene_infiniteLab_standard_type_2.jpg" alt="" id="BLOGGER_PHOTO_ID_5299365531448653810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Making simplier walls appears problems of double corners and doesn't seems very well.&lt;br /&gt;&lt;br /&gt;Finaly there is a more complex method than the previous one. Consists on chosing figures randomly only in pair coordinates (i,j) which sum i+j are even (from this point, even regions). That yields a checker pattern. In the even regions we assign one shape selected by the pseudorandom generator. In the other hand, in the odd regions the shape is assigned by a shape that matchs with the shapes that are sharing each face. That is, if the north face of the figure that I have in the south has a wall, my south face should have a wall. So, both walls match together.&lt;br /&gt;&lt;br /&gt;Choosing correctly the shapes and with a little extra programming we can achieve these images:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SYsmB6ZeskI/AAAAAAAAAJ4/_khjIjQ8UcA/s1600-h/scene_infiniteLab_standard_type_1_prob.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SYsmB6ZeskI/AAAAAAAAAJ4/_khjIjQ8UcA/s320/scene_infiniteLab_standard_type_1_prob.jpg" alt="" id="BLOGGER_PHOTO_ID_5299371200829370946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBnUOt7I/AAAAAAAAAJw/wN7oXijmpaU/s1600-h/scene_infiniteLab_standard_type_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBnUOt7I/AAAAAAAAAJw/wN7oXijmpaU/s320/scene_infiniteLab_standard_type_1.jpg" alt="" id="BLOGGER_PHOTO_ID_5299371195707078578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Using non linear cameras:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBvOS-bI/AAAAAAAAAJo/r-NXuOBv5Qk/s1600-h/scene_infiniteLab_cylindrical_type_1_prob_2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBvOS-bI/AAAAAAAAAJo/r-NXuOBv5Qk/s320/scene_infiniteLab_cylindrical_type_1_prob_2.jpg" alt="" id="BLOGGER_PHOTO_ID_5299371197829675442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Using some procedural textures and phong materials:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBpJGI3I/AAAAAAAAAJg/5N5aGYjfjXY/s1600-h/scene_infiniteLab_cylindrical_type_1_prob.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBpJGI3I/AAAAAAAAAJg/5N5aGYjfjXY/s320/scene_infiniteLab_cylindrical_type_1_prob.jpg" alt="" id="BLOGGER_PHOTO_ID_5299371196197249906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If we use the first proposed method the labyrinth looks like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmB3rZQsI/AAAAAAAAAKA/1wKxC8hBbGs/s1600-h/scene_infiniteLab_standard_type_1_wrong.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmB3rZQsI/AAAAAAAAAKA/1wKxC8hBbGs/s320/scene_infiniteLab_standard_type_1_wrong.jpg" alt="" id="BLOGGER_PHOTO_ID_5299371200099205826" border="0" /&gt;&lt;/a&gt;That's wrong but nice to test global illumination.&lt;br /&gt;&lt;br /&gt;Obviously changing slightly the hashing function (adding a sum operation, in example) we can make labyrinths totaly indistinguishable ones with each others. We have graphically represented the hashing function.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="blk_2" class="blk_2" style="display: none;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;E&lt;/span&gt;n un artículo anterior (Truchet Tesellations) mostré una forma de representar laberintos en una esfera y por el final, en un plano. En este voy a mostrar otra forma de representar laberintos infinitos en un plano.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;Normalmente estos laberintos son conjuntos finitos de triangulos. Uno de los principales problemas en este tipo de representaciones es que se pueden ver límites.&lt;br /&gt;&lt;br /&gt;Una manera de resolver esto es replicando la figura. Tarde o temprano se puede intuír una figura periódica, notándose un comportamiento artificial.&lt;br /&gt;&lt;br /&gt;Por lo tanto si se desea representar laberintos infinitos habrá que buscar una manera que cumpla las siguientes condiciones:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Cubra todo el dominio visible.&lt;/li&gt;&lt;li&gt;Ausencia de periodicidad en la imagen.&lt;/li&gt;&lt;/ul&gt;La manera que presento para realizar este cometido es el siguiente:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Dividase el plano (de forma algorítmica) en regiones cuadradas de dimension unitaria (una rejilla de infinitos cuadros, en los que cada cuadro mide una unidad de lado).&lt;/li&gt;&lt;li&gt;Asígnese a cada region cuadrada una figura tridimensional (por ejemplo, un muro en una pared).&lt;/li&gt;&lt;/ul&gt;Cuando un rayo incida en una región, intersectará con la forma asociada a esa región. Cuando, por reflexión o atravesamiento, cambie de región se computará la intersección con la asignada a ésta.&lt;br /&gt;&lt;br /&gt;Aquí muestro un ejemplo usando siempre la misma forma.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SYsfWejRqlI/AAAAAAAAAIk/NUrSnWDMIWg/s1600-h/scene_plane_standard.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SYsfWejRqlI/AAAAAAAAAIk/NUrSnWDMIWg/s320/scene_plane_standard.jpg" alt="" id="Img1" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsfWRxLw0I/AAAAAAAAAIs/1EcyFPP0IQc/s1600-h/scene_plane_cylindrical.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsfWRxLw0I/AAAAAAAAAIs/1EcyFPP0IQc/s320/scene_plane_cylindrical.jpg" alt="" id="Img2" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Este método presenta una serie de decisiones:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Cuántos tipos de figuras uso.&lt;/li&gt;&lt;li&gt;Cómo asigno cada región una figura determinada.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;El primer punto lo elije el usuario. Por ejemplo, mi conjunto de figures será:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Un muro de 0.1 unidades de ancho por 1 unidad de largo puesto en la cara norte de la región.&lt;/li&gt;&lt;li&gt;Otro muro similar orientado en la cara oeste.&lt;/li&gt;&lt;/ul&gt;Para el segundo punto hay que pensar un poco. A cada coordenada (entera) del espacio le he de asignar un número aleatorio. La función sería f(i,j)-&gt;n. Siendo i y j números enteros y n un número real de 0 a 1. Esa función ha de devolver valores muy dispares de 'n' para valores cercanos de i y j. Esto es o una función de hashing o un generador de números pseudo-aleatorios. Esencialmente son lo mismo.&lt;br /&gt;El generador será un LCM o congruente lineal. Corremos el riesgo de que se de el efecto Marsaglia. Se dará, y el usario quizás vea una cierta periodicidad, pero dificil de ver. &lt;br /&gt;&lt;br /&gt;Cada figura tiene una probabilidad de aparición determinada (por ejemplo, 1/número_de_figuras). Se seleccionará la figura usando la técnica de la ruleta rusa según el número aletorio generado. Como el número es pseudoaleatorio y depende de los parámetros de entrada siempre devolverá el mismo valor para mismos valores de entrada.&lt;br /&gt;&lt;br /&gt;Los resultados son los siguientes:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SYsgSr5dJAI/AAAAAAAAAI0/G5Yk23tFtjY/s1600-h/scene_infiniteLab_standard_type_0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SYsgSr5dJAI/AAAAAAAAAI0/G5Yk23tFtjY/s320/scene_infiniteLab_standard_type_0.jpg" alt="" id="Img3" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Y con una distribución de probabilidad diferente:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SYsgSmn7VFI/AAAAAAAAAI8/bdfJFFxZV0s/s1600-h/scene_infiniteLab_standard_type_0_prob.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SYsgSmn7VFI/AAAAAAAAAI8/bdfJFFxZV0s/s320/scene_infiniteLab_standard_type_0_prob.jpg" alt="" id="Img4" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Como puede verse, al escoger este tipo de figuras, hace que la esquina noroeste siempre esté ocupada por lo tanto el aspecto es de figuras que parece que crecen en una misma dirección.&lt;br /&gt;&lt;br /&gt;Se pueden resolver añadiendo otra figura más que es un muro doble este-sur. De esta manera la distribución de esquinas es uniforme y no se ve que "crezca" en ninguna dirección. Esto añade más huecos y hace que el laberinto esté mas cerrado.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SYsg35kGQ5I/AAAAAAAAAJM/y1ts4DiHXHM/s1600-h/scene_infiniteLab_standard_type_3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SYsg35kGQ5I/AAAAAAAAAJM/y1ts4DiHXHM/s320/scene_infiniteLab_standard_type_3.jpg" alt="" id="Img5" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Esta es con una figura con una columna en el medio de la región:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SYsg36TyN_I/AAAAAAAAAJE/ZPy6gIB1EAM/s1600-h/scene_infiniteLab_standard_type_2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SYsg36TyN_I/AAAAAAAAAJE/ZPy6gIB1EAM/s320/scene_infiniteLab_standard_type_2.jpg" alt="" id="Img6" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Haciendo muros simples aparecen problemas de esquinas dobles y no queda bien.&lt;br /&gt;&lt;br /&gt;Finalmente hay un método más complicado que el anterior. Consiste en elegir figuras aleatoriamente sólo para coordenadas (i,j) cuya suma i+j sea par (a partir de ahora, regiones pares). Lo que produce un patrón ajedrezado. A las regiones pares se les asigna una figura según el generador de números aleatorios (o función de hashing). En cambio, a las regiones impares se les asigna una figura que case con las figuras con las que comparte una cara. Esto es, si la cara norte de la figura que tengo al sur tiene muro, mi cara sur ha de tener muro.&lt;br /&gt;&lt;br /&gt;Eligiendo correctamente las figuras y con un poco de codificación extra se producen estas imágenes:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SYsmB6ZeskI/AAAAAAAAAJ4/_khjIjQ8UcA/s1600-h/scene_infiniteLab_standard_type_1_prob.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SYsmB6ZeskI/AAAAAAAAAJ4/_khjIjQ8UcA/s320/scene_infiniteLab_standard_type_1_prob.jpg" alt="" id="Img7" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBnUOt7I/AAAAAAAAAJw/wN7oXijmpaU/s1600-h/scene_infiniteLab_standard_type_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBnUOt7I/AAAAAAAAAJw/wN7oXijmpaU/s320/scene_infiniteLab_standard_type_1.jpg" alt="" id="Img8" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Usando cámaras no lineales:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBvOS-bI/AAAAAAAAAJo/r-NXuOBv5Qk/s1600-h/scene_infiniteLab_cylindrical_type_1_prob_2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBvOS-bI/AAAAAAAAAJo/r-NXuOBv5Qk/s320/scene_infiniteLab_cylindrical_type_1_prob_2.jpg" alt="" id="Img9" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Usando algunas texturas procedurales y materiales de phong:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBpJGI3I/AAAAAAAAAJg/5N5aGYjfjXY/s1600-h/scene_infiniteLab_cylindrical_type_1_prob.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmBpJGI3I/AAAAAAAAAJg/5N5aGYjfjXY/s320/scene_infiniteLab_cylindrical_type_1_prob.jpg" alt="" id="Img10" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Si usamos el primer método propuesto para el laberinot aparece así:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmB3rZQsI/AAAAAAAAAKA/1wKxC8hBbGs/s1600-h/scene_infiniteLab_standard_type_1_wrong.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SYsmB3rZQsI/AAAAAAAAAKA/1wKxC8hBbGs/s320/scene_infiniteLab_standard_type_1_wrong.jpg" alt="" id="Img11" border="0" /&gt;&lt;/a&gt;Esto es incorrecto pero queda bien para iluminación global&lt;br /&gt;&lt;br /&gt;Obviamente cambiando ligeramente la función de hashing (añadiendo una suma, por ejemplo) se pueden construir laberintos totalmente indistinguibles unos de otros. Hemos representado gráficamente una función de hashing.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-6849801186557342309?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/6849801186557342309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/02/infinite-labyrinths.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/6849801186557342309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/6849801186557342309'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/02/infinite-labyrinths.html' title='Infinite Labyrinths'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_mvoUye45cQc/SYsfWejRqlI/AAAAAAAAAIk/NUrSnWDMIWg/s72-c/scene_plane_standard.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-8598933298977068992</id><published>2009-01-28T00:40:00.010+01:00</published><updated>2009-04-26T17:48:45.559+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wallpaper'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><category scheme='http://www.blogger.com/atom/ns#' term='global illumination'/><title type='text'>White Sky</title><content type='html'>&lt;a href="#"&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="blk_1" class="blk_1" style="display: inline;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;I&lt;/span&gt; put here some renders that I did some time ago and I have re-rendered recently. Simply they are simple geometric figures to test oclussions. The skydome is totaly white, as well as the reflectors and the luminarie. The result so it is gray. Originally these designs were backgrounds of a lost blog that I did long time ago. It can be work quite well as wallpapers.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SX-b7cj7fLI/AAAAAAAAAII/W6zh587_G6g/s1600-h/scene_whitesky_00.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SX-b7cj7fLI/AAAAAAAAAII/W6zh587_G6g/s320/scene_whitesky_00.jpg" alt="" id="BLOGGER_PHOTO_ID_5296123132392471730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SX-b7j3Rx6I/AAAAAAAAAIQ/OSQo6Jcnvp0/s1600-h/scene_whitesky_01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SX-b7j3Rx6I/AAAAAAAAAIQ/OSQo6Jcnvp0/s320/scene_whitesky_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5296123134352672674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SX-b7yoGRlI/AAAAAAAAAIY/9oLj4dVDmA8/s1600-h/scene_whitesky_02.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SX-b7yoGRlI/AAAAAAAAAIY/9oLj4dVDmA8/s320/scene_whitesky_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5296123138315535954" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div id="blk_2" class="blk_2" style="display: none;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;D&lt;/span&gt;ejo por aquí unos renders que hice hace un tiempo y he repetido hace poco. Simplemente son figuras geométricas simples para probar oclusiones. La cúpula celeste es totalmente blanca, al igual que los reflectores y una luminaria. El resultado por lo tanto es gris. Originalmente estos diseños fueron fondos de un blog desaparecido que hice hace tiempo. Pueden funcionar bastante bien como fondo de pantalla.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SX-b7cj7fLI/AAAAAAAAAII/W6zh587_G6g/s1600-h/scene_whitesky_00.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SX-b7cj7fLI/AAAAAAAAAII/W6zh587_G6g/s320/scene_whitesky_00.jpg" alt="" id="BLOGGER_PHOTO_ID_5296123132392471730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SX-b7j3Rx6I/AAAAAAAAAIQ/OSQo6Jcnvp0/s1600-h/scene_whitesky_01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SX-b7j3Rx6I/AAAAAAAAAIQ/OSQo6Jcnvp0/s320/scene_whitesky_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5296123134352672674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SX-b7yoGRlI/AAAAAAAAAIY/9oLj4dVDmA8/s1600-h/scene_whitesky_02.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SX-b7yoGRlI/AAAAAAAAAIY/9oLj4dVDmA8/s320/scene_whitesky_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5296123138315535954" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-8598933298977068992?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/8598933298977068992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/01/white-sky.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/8598933298977068992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/8598933298977068992'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/01/white-sky.html' title='White Sky'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_mvoUye45cQc/SX-b7cj7fLI/AAAAAAAAAII/W6zh587_G6g/s72-c/scene_whitesky_00.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-4173910284872568267</id><published>2009-01-18T19:49:00.002+01:00</published><updated>2009-04-26T17:48:00.918+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bunny'/><category scheme='http://www.blogger.com/atom/ns#' term='stanford'/><category scheme='http://www.blogger.com/atom/ns#' term='Tiling'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><category scheme='http://www.blogger.com/atom/ns#' term='Truchet'/><title type='text'>Truchet Tilings</title><content type='html'>&lt;a href="#"&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="#"&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="blk_1" class="blk_1" style="display:inline"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;T&lt;/span&gt;oday I'm going to show a set of renders that are related to Truchet Tesellations. In 1704 &lt;a href="http://en.wikipedia.org/wiki/Sebastien_Truchet"&gt;Sebastien Truchet&lt;/a&gt; thought about a system of teselate a plane using oriented triangles. A modification of this one allow us to generate labyrinthic motifs using curved lines. In 1989 &lt;a href="http://sprott.physics.wisc.edu/pickover/home.htm"&gt;Pickover&lt;/a&gt; shown that it was an elegant method to see patterns in pseudorandom numbers secuences.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Seeing the Pickover's motifs I thought that it should be a way to tesselate a sphere without producing singularities at the poles.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So, here they are the ingredients:&lt;br /&gt;&lt;ul&gt;&lt;li style="text-align: left;"&gt;Take a geodesic sphere discretized in triangles more or less regular with similar size.&lt;/li&gt;&lt;li&gt;Define 5 triangular tiles.&lt;/li&gt;&lt;li style="text-align: left;"&gt;For each triangle replace it with one of the 5 tiles in a random fashion or with a certain probability distribution.&lt;/li&gt;&lt;/ul&gt;Here I show the results:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SXN9bx9YXuI/AAAAAAAAAFE/ea67TusISt0/s1600-h/scene_truchet_000.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SXN9bx9YXuI/AAAAAAAAAFE/ea67TusISt0/s320/scene_truchet_000.jpg" alt="" id="BLOGGER_PHOTO_ID_5292711903311191778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It can be shown only a certain kind of tiles:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXN-1KXaiaI/AAAAAAAAAFM/c2hKf_gwLO0/s1600-h/scene_truchet_008_%5B10000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN8BRzFtdI/AAAAAAAAADs/1uRulqDYGWw/s320/clip_scene_truchet_008_%5B10000%5D.jpg" alt="" id="Img1" border="0" /&gt;&lt;/a&gt;Type 1&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXN_JWQlIYI/AAAAAAAAAFU/yPSqamYPnaI/s1600-h/scene_truchet_008_%5B01000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXN8BB7sESI/AAAAAAAAADk/y9Z27ddmTDc/s320/clip_scene_truchet_008_%5B01000%5D.jpg" alt="" id="Img2" border="0" /&gt;&lt;/a&gt;Type 2&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXN_VdHruHI/AAAAAAAAAFc/Ojgnk1zpoRE/s1600-h/scene_truchet_008_%5B00100%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN8A6Hj_sI/AAAAAAAAADc/1fVz32RaBjI/s320/clip_scene_truchet_008_%5B00100%5D.jpg" alt="" id="Img3" border="0" /&gt;&lt;/a&gt;Type 3&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXN_g0FbPvI/AAAAAAAAAFk/kyze0uC3ybw/s1600-h/scene_truchet_008_%5B00010%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN8AnQ7NAI/AAAAAAAAADU/x6F6BaMdTq8/s320/clip_scene_truchet_008_%5B00010%5D.jpg" alt="" id="Img4" border="0" /&gt;&lt;/a&gt;Type 4&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXN_u50vgqI/AAAAAAAAAFs/t9-zVpKNKfc/s1600-h/scene_truchet_008_%5B00001%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN8AYWp74I/AAAAAAAAADM/eH0IfcinNJw/s320/clip_scene_truchet_008_%5B00001%5D.jpg" alt="" id="Img5" border="0" /&gt;&lt;/a&gt;Type 5&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Only two types:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SXOAUoHJTAI/AAAAAAAAAF0/z7Ned2yhr1g/s1600-h/scene_truchet_008_%5B11000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN8kHKBAoI/AAAAAAAAAEM/BS1jJQ1HC4g/s320/clip_scene_truchet_008_%5B11000%5D.jpg" alt="" id="Img6" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXOAsDR2d6I/AAAAAAAAAF8/-xHE6E0E2gc/s1600-h/scene_truchet_008_%5B73000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN8k2eeAsI/AAAAAAAAAEk/GvLYKEefIlM/s320/clip_scene_truchet_008_%5B73000%5D.jpg" alt="" id="Img7" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOBNn4PGEI/AAAAAAAAAGE/j3tzygXHMGg/s1600-h/scene_truchet_008_%5B37000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN8ku_EocI/AAAAAAAAAEU/-Abm-wM3lik/s320/clip_scene_truchet_008_%5B37000%5D.jpg" alt="" id="Img8" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Uniform proability distributions:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SXOB0ePSe-I/AAAAAAAAAGM/VxsEnZJJjys/s1600-h/scene_truchet_008_%5BUniform%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN88EV2AWI/AAAAAAAAAE8/RG2keEYIe7A/s320/clip_scene_truchet_008_%5BUniform%5D.jpg" alt="" id="Img9" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Distributions of non uniform probability for each type:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOCPv43ZHI/AAAAAAAAAGc/-l3611ci8LM/s1600-h/scene_truchet_008_%5B73505%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN8lLq1iAI/AAAAAAAAAEs/1JGbKxBHves/s320/clip_scene_truchet_008_%5B73505%5D.jpg" alt="" id="Img10" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOCPXJkSBI/AAAAAAAAAGU/mgbGqTPaa4I/s1600-h/scene_truchet_008_%5B71151%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXN8kvyarFI/AAAAAAAAAEc/dtchUjpZzok/s320/clip_scene_truchet_008_%5B71151%5D.jpg" alt="" id="Img11" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SXOCP7-EgeI/AAAAAAAAAGk/a_JTZBREHkY/s1600-h/scene_truchet_008_%5B92512%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN87_4210I/AAAAAAAAAE0/g-PYQ69SQMA/s320/clip_scene_truchet_008_%5B92512%5D.jpg" alt="" id="Img12" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finaly all the types:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXODGwZ3kFI/AAAAAAAAAGs/VN6_5J9yhp4/s1600-h/scene_truchet_011.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXODGwZ3kFI/AAAAAAAAAGs/VN6_5J9yhp4/s320/scene_truchet_011.jpg" alt="" id="Img13" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Images without the inner sphere:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXOD90zD9oI/AAAAAAAAAG0/X-8jU8SoR98/s1600-h/scene_truchet_002.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXOD90zD9oI/AAAAAAAAAG0/X-8jU8SoR98/s320/scene_truchet_002.jpg" alt="" id="Img14" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;and with a inner point of light:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOEWRN4kzI/AAAAAAAAAG8/v4iC9h_btS8/s1600-h/scene_truchet_006.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXOEWRN4kzI/AAAAAAAAAG8/v4iC9h_btS8/s320/scene_truchet_006.jpg" alt="" id="Img15" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;With other materials:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXOE2o7sEqI/AAAAAAAAAHc/HQmpxRvPI7Y/s1600-h/scene_truchet_008.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXOE2o7sEqI/AAAAAAAAAHc/HQmpxRvPI7Y/s320/scene_truchet_008.jpg" alt="" id="Img16" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOE2eyb-7I/AAAAAAAAAHU/1K11qW6izJY/s1600-h/scene_truchet_007.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOE2eyb-7I/AAAAAAAAAHU/1K11qW6izJY/s320/scene_truchet_007.jpg" alt="" id="Img17" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOE1rqHfqI/AAAAAAAAAHM/HvIWnVJe4To/s1600-h/scene_truchet_005.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXOE1rqHfqI/AAAAAAAAAHM/HvIWnVJe4To/s320/scene_truchet_005.jpg" alt="" id="Img18" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOE1fDH3NI/AAAAAAAAAHE/N7i-zoxRXS0/s1600-h/scene_truchet_003.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOE1fDH3NI/AAAAAAAAAHE/N7i-zoxRXS0/s320/scene_truchet_003.jpg" alt="" id="Img19" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Planar projections with non-linear cameras:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOFMw5KbLI/AAAAAAAAAHs/CYgW8w1-HjY/s1600-h/scene_truchet_004.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXOFMw5KbLI/AAAAAAAAAHs/CYgW8w1-HjY/s320/scene_truchet_004.jpg" alt="" id="Img20" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOFM7TVpyI/AAAAAAAAAHk/3-Je9Qil6Ac/s1600-h/scene_truchet_001.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOFM7TVpyI/AAAAAAAAAHk/3-Je9Qil6Ac/s320/scene_truchet_001.jpg" alt="" id="Img21" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Finally, with all those projections depends on a triangular mesh it's possible to make denser motifs or even with a certain meshes. Like in this case, the Stanford Bunny:&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOF2ZcvVJI/AAAAAAAAAH8/8p_b-C92dVA/s1600-h/scene_truchet_010.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOF2ZcvVJI/AAAAAAAAAH8/8p_b-C92dVA/s320/scene_truchet_010.jpg" alt="" id="Img22" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOF1rCO3DI/AAAAAAAAAH0/XARUHM6ErhY/s1600-h/scene_truchet_009.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOF1rCO3DI/AAAAAAAAAH0/XARUHM6ErhY/s320/scene_truchet_009.jpg" alt="" id="Img23" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div id="blk_2" class="blk_2" style="display:none"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:180%;"&gt;H&lt;/span&gt;oy voy a mostrar un conjunto de renders que derivan de las teselaciones de Truchet. En 1704 &lt;a href="http://en.wikipedia.org/wiki/Sebastien_Truchet"&gt;Sebastien Truchet&lt;/a&gt; ideó un sistema para teselar el plano utilizando triángulos orientados. Una modificación de éste permite generar motivos laberínticos utilizando líneas curvas. En 1989 &lt;a href="http://sprott.physics.wisc.edu/pickover/home.htm"&gt;Pickover&lt;/a&gt; mostró que era un elegante modelo para apreciar patrones en secuencias de números pseudoaleatorios.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Viendo los motivos de Pickover pensé que tendría que haber alguna manera de teselar una esfera sin producir comportamientos singulares en los polos.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Pues bien, aquí están los ingredientes:&lt;br /&gt;&lt;ul&gt;&lt;li style="text-align: left;"&gt;Tómese una esfera geodésica discretizada en triángulos más o menos regulares con tamaños similares.&lt;/li&gt;&lt;li&gt;Definanse 5 teselas triangulares.&lt;/li&gt;&lt;li style="text-align: left;"&gt;Para cada triángulo sustituyase por una de las 5 teselas de forma aleatoria o con una distribución de probabilidad.&lt;/li&gt;&lt;/ul&gt;Aquí muestro los resultados:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SXN9bx9YXuI/AAAAAAAAAFE/ea67TusISt0/s1600-h/scene_truchet_000.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SXN9bx9YXuI/AAAAAAAAAFE/ea67TusISt0/s320/scene_truchet_000.jpg" alt="" id="BLOGGER_PHOTO_ID_5292711903311191778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Se pueden mostrar únicamente un tipo de teselas:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXN-1KXaiaI/AAAAAAAAAFM/c2hKf_gwLO0/s1600-h/scene_truchet_008_%5B10000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN8BRzFtdI/AAAAAAAAADs/1uRulqDYGWw/s320/clip_scene_truchet_008_%5B10000%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710348489864658" border="0" /&gt;&lt;/a&gt;Tipo 1&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXN_JWQlIYI/AAAAAAAAAFU/yPSqamYPnaI/s1600-h/scene_truchet_008_%5B01000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXN8BB7sESI/AAAAAAAAADk/y9Z27ddmTDc/s320/clip_scene_truchet_008_%5B01000%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710344230965538" border="0" /&gt;&lt;/a&gt;Tipo 2&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXN_VdHruHI/AAAAAAAAAFc/Ojgnk1zpoRE/s1600-h/scene_truchet_008_%5B00100%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN8A6Hj_sI/AAAAAAAAADc/1fVz32RaBjI/s320/clip_scene_truchet_008_%5B00100%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710342133284546" border="0" /&gt;&lt;/a&gt;Tipo 3&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXN_g0FbPvI/AAAAAAAAAFk/kyze0uC3ybw/s1600-h/scene_truchet_008_%5B00010%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN8AnQ7NAI/AAAAAAAAADU/x6F6BaMdTq8/s320/clip_scene_truchet_008_%5B00010%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710337072280578" border="0" /&gt;&lt;/a&gt;Tipo 4&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXN_u50vgqI/AAAAAAAAAFs/t9-zVpKNKfc/s1600-h/scene_truchet_008_%5B00001%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN8AYWp74I/AAAAAAAAADM/eH0IfcinNJw/s320/clip_scene_truchet_008_%5B00001%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710333069782914" border="0" /&gt;&lt;/a&gt;Tipo 5&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Sólo dos de los tipos:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SXOAUoHJTAI/AAAAAAAAAF0/z7Ned2yhr1g/s1600-h/scene_truchet_008_%5B11000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN8kHKBAoI/AAAAAAAAAEM/BS1jJQ1HC4g/s320/clip_scene_truchet_008_%5B11000%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710946928657026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXOAsDR2d6I/AAAAAAAAAF8/-xHE6E0E2gc/s1600-h/scene_truchet_008_%5B73000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN8k2eeAsI/AAAAAAAAAEk/GvLYKEefIlM/s320/clip_scene_truchet_008_%5B73000%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710959630910146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOBNn4PGEI/AAAAAAAAAGE/j3tzygXHMGg/s1600-h/scene_truchet_008_%5B37000%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN8ku_EocI/AAAAAAAAAEU/-Abm-wM3lik/s320/clip_scene_truchet_008_%5B37000%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710957620175298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Distribuciones de probabilidad uniforme:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SXOB0ePSe-I/AAAAAAAAAGM/VxsEnZJJjys/s1600-h/scene_truchet_008_%5BUniform%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXN88EV2AWI/AAAAAAAAAE8/RG2keEYIe7A/s320/clip_scene_truchet_008_%5BUniform%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292711358489821538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Distribuciones de probabilidad no uniforme para los distintos tipos:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOCPv43ZHI/AAAAAAAAAGc/-l3611ci8LM/s1600-h/scene_truchet_008_%5B73505%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN8lLq1iAI/AAAAAAAAAEs/1JGbKxBHves/s320/clip_scene_truchet_008_%5B73505%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710965319927810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOCPXJkSBI/AAAAAAAAAGU/mgbGqTPaa4I/s1600-h/scene_truchet_008_%5B71151%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXN8kvyarFI/AAAAAAAAAEc/dtchUjpZzok/s320/clip_scene_truchet_008_%5B71151%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292710957835529298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SXOCP7-EgeI/AAAAAAAAAGk/a_JTZBREHkY/s1600-h/scene_truchet_008_%5B92512%5D.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXN87_4210I/AAAAAAAAAE0/g-PYQ69SQMA/s320/clip_scene_truchet_008_%5B92512%5D.jpg" alt="" id="BLOGGER_PHOTO_ID_5292711357294499650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finalmente todos los tipos:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXODGwZ3kFI/AAAAAAAAAGs/VN6_5J9yhp4/s1600-h/scene_truchet_011.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXODGwZ3kFI/AAAAAAAAAGs/VN6_5J9yhp4/s320/scene_truchet_011.jpg" alt="" id="BLOGGER_PHOTO_ID_5292718139186319442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Imágenes sin la esfera interior:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXOD90zD9oI/AAAAAAAAAG0/X-8jU8SoR98/s1600-h/scene_truchet_002.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXOD90zD9oI/AAAAAAAAAG0/X-8jU8SoR98/s320/scene_truchet_002.jpg" alt="" id="BLOGGER_PHOTO_ID_5292719085258536578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;y con un punto de luz interior:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOEWRN4kzI/AAAAAAAAAG8/v4iC9h_btS8/s1600-h/scene_truchet_006.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXOEWRN4kzI/AAAAAAAAAG8/v4iC9h_btS8/s320/scene_truchet_006.jpg" alt="" id="BLOGGER_PHOTO_ID_5292719505204089650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Con otros materiales:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SXOE2o7sEqI/AAAAAAAAAHc/HQmpxRvPI7Y/s1600-h/scene_truchet_008.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SXOE2o7sEqI/AAAAAAAAAHc/HQmpxRvPI7Y/s320/scene_truchet_008.jpg" alt="" id="BLOGGER_PHOTO_ID_5292720061326037666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOE2eyb-7I/AAAAAAAAAHU/1K11qW6izJY/s1600-h/scene_truchet_007.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOE2eyb-7I/AAAAAAAAAHU/1K11qW6izJY/s320/scene_truchet_007.jpg" alt="" id="BLOGGER_PHOTO_ID_5292720058602879922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOE1rqHfqI/AAAAAAAAAHM/HvIWnVJe4To/s1600-h/scene_truchet_005.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXOE1rqHfqI/AAAAAAAAAHM/HvIWnVJe4To/s320/scene_truchet_005.jpg" alt="" id="BLOGGER_PHOTO_ID_5292720044877774498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOE1fDH3NI/AAAAAAAAAHE/N7i-zoxRXS0/s1600-h/scene_truchet_003.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOE1fDH3NI/AAAAAAAAAHE/N7i-zoxRXS0/s320/scene_truchet_003.jpg" alt="" id="BLOGGER_PHOTO_ID_5292720041492995282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Proyecciones planares con cámaras no lineales:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SXOFMw5KbLI/AAAAAAAAAHs/CYgW8w1-HjY/s1600-h/scene_truchet_004.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SXOFMw5KbLI/AAAAAAAAAHs/CYgW8w1-HjY/s320/scene_truchet_004.jpg" alt="" id="BLOGGER_PHOTO_ID_5292720441420049586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOFM7TVpyI/AAAAAAAAAHk/3-Je9Qil6Ac/s1600-h/scene_truchet_001.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOFM7TVpyI/AAAAAAAAAHk/3-Je9Qil6Ac/s320/scene_truchet_001.jpg" alt="" id="BLOGGER_PHOTO_ID_5292720444214191906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Finalmente, como todas estas proyecciones dependen de una malla triangular se pueden hacer motivos más densos o incluso con mallas de formas determinadas. En este caso, el conejito de stanford (Stanford Bunny):&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOF2ZcvVJI/AAAAAAAAAH8/8p_b-C92dVA/s1600-h/scene_truchet_010.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOF2ZcvVJI/AAAAAAAAAH8/8p_b-C92dVA/s320/scene_truchet_010.jpg" alt="" id="BLOGGER_PHOTO_ID_5292721156681323666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SXOF1rCO3DI/AAAAAAAAAH0/XARUHM6ErhY/s1600-h/scene_truchet_009.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SXOF1rCO3DI/AAAAAAAAAH0/XARUHM6ErhY/s320/scene_truchet_009.jpg" alt="" id="BLOGGER_PHOTO_ID_5292721144222112818" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-4173910284872568267?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/4173910284872568267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/01/truchet-tilings.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/4173910284872568267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/4173910284872568267'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/01/truchet-tilings.html' title='Truchet Tilings'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_mvoUye45cQc/SXN9bx9YXuI/AAAAAAAAAFE/ea67TusISt0/s72-c/scene_truchet_000.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-5860914298886555797</id><published>2009-01-17T20:14:00.002+01:00</published><updated>2009-04-26T17:50:59.984+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='Texts'/><category scheme='http://www.blogger.com/atom/ns#' term='blogspot'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='bilingual'/><title type='text'>Textos bilingües</title><content type='html'>&lt;a href="#"&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt;&lt;span&gt;    &lt;/span&gt;&lt;a href="#"&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="blk_2" class="blk_2" style="display: none;"&gt;&lt;div style="text-align: justify;"&gt;Este post no va dirigido a temas de informática gráfica. Presento una manera de poder mostrar 'posts' en dos idiomas. El sistema es muy sencillo y se puede utilizar en blogspot como voy a demostrar. No he perdido mucho tiempo buscando por internet mecanismos similares. Debido a la sencillez he preferido realizarlo por mi mismo.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Para llevar a cabo esto se usará Javascript. Expongo los pasos:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Modificación de la plantilla&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Creación de los links de idioma en el post&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Definición de los bloques de idioma en el post&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Modificación de la plantilla&lt;/span&gt;&lt;br /&gt;En las opciones de blogger de 'Diseño' se modifica la plantilla HTML. Añadiendo lo siguiente:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script language='javascript' type='text/javascript'&amp;gt;&lt;br /&gt;function showBlk_1 ()&lt;br /&gt;{&lt;br /&gt;    var nodeObj = document.getElementById('blk_1')&lt;br /&gt;    nodeObj.style.display = 'inline';&lt;br /&gt;    var nodeObj = document.getElementById('blk_2')&lt;br /&gt;    nodeObj.style.display = 'none';&lt;br /&gt;}&lt;br /&gt;function showBlk_2 ()&lt;br /&gt;{&lt;br /&gt;    var nodeObj = document.getElementById('blk_2')&lt;br /&gt;    nodeObj.style.display = 'inline';&lt;br /&gt;    var nodeObj = document.getElementById('blk_1')&lt;br /&gt;    nodeObj.style.display = 'none';&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;El código es sencillo. Si se invoca a showBlk_1 se cambia el estilo del bloque identificado como 'blk_1' a visible, y el identificado como 'blk_2' a invisible.&lt;br /&gt;&lt;/div&gt;La otra función realiza la operación inversa.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Creación de los links de idioma en el post&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Simplemente definimos etiquetas 'span' o 'a' con un href apuntando a '#' y esto es lo importante: Una función onclick.&lt;br /&gt;&lt;/div&gt;Por ejemplo:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;a href='#'&amp;gt;&amp;lt;span onclick="showBlk_1()"&amp;gt;Spanish&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;a href='#'&amp;gt;&amp;lt;span onclick="showBlk_2()"&amp;gt;English&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Definición de los bloques de idioma en el post&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Finalmente ahora se escriben los textos en los dos idiomas. El texto en el idioma asociado al bloque 1 (blk_1) estará dentro de un div identificado con blk_1.&lt;br /&gt;Los textos en el otro idioma estarán metidos dentro del otro bloque.&lt;br /&gt;&lt;/div&gt;Por ejemplo:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;div id="blk_1" style="display: inline;"&amp;gt;Esto es un texto en idioma Español.&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id="blk_2" style="display: none;"&gt;This is an English text.&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Uno de los bloques ha de ser visible y los demás invisbles para que por defecto se muestre sólo un idioma.&lt;br /&gt;Aquí por claridad se ha añadido un retorno de carro para separar los divs pero en el post han de estar los 'divs' pegados. Si no, el segundo idioma aparecerá con un retorno de línea extra.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Conclusión&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Se ha presentado una manera muy sencilla de generar posts en dos idiomas. Este modelo es a su vez fácilmente escalable para esquemas de múltiples idiomas.&lt;/div&gt;&lt;/div&gt;&lt;div id="blk_1" class="blk_1" style="display: inline;"&gt;&lt;div style="text-align: justify;"&gt;This post is not related to computer graphics. I present a way to show posts in two languages. The mechanism is very simple and can be used in blogspot as I'm going to show. I haven't wasted too much time in finding over internet similar mechanisms. Due to the simplicity of this method I had prefered doing it by myself.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;In order to achieve this javascript will be used. I expose the steps:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Modifying the template&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Creation of the language links in the post&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Definition of the language blocks in the post&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Modifying the template&lt;/span&gt;&lt;br /&gt;The template can be modified in Design options of blogger. It's possible to add this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;script language='javascript' type='text/javascript'&amp;gt;&lt;br /&gt;function showBlk_1 ()&lt;br /&gt;{&lt;br /&gt;    var nodeObj = document.getElementById('blk_1')&lt;br /&gt;    nodeObj.style.display = 'inline';&lt;br /&gt;    var nodeObj = document.getElementById('blk_2')&lt;br /&gt;    nodeObj.style.display = 'none';&lt;br /&gt;}&lt;br /&gt;function showBlk_2 ()&lt;br /&gt;{&lt;br /&gt;    var nodeObj = document.getElementById('blk_2')&lt;br /&gt;    nodeObj.style.display = 'inline';&lt;br /&gt;    var nodeObj = document.getElementById('blk_1')&lt;br /&gt;    nodeObj.style.display = 'none';&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The code is simple. If showBlk_1 is invoked, the style of the block identified by blk_1 is changed to visible, and the one identified with blk_2 is set to invisible.&lt;br /&gt;The other function does the oposite operation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Creation of the language links in the post&lt;/span&gt;&lt;br /&gt;Simply we define the tags 'span' o 'a' with a href targeting '#' and this is the important thing: An onclick function:&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;a href='#'&amp;gt;&amp;lt;span onclick="showBlk_1()"&amp;gt;Spanish&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;a href='#'&amp;gt;&amp;lt;span onclick="showBlk_2()"&amp;gt;English&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Definition of the language blocks in the post&lt;/span&gt;&lt;br /&gt;Finaly now the texts in the two languages are written. The text in the language associated to the block 1 (blk_1) will be inside in a div block identified with blk_1.&lt;br /&gt;The texts in the other language will be inside the other block.&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;div id="blk_1" style="display: inline;"&amp;gt;Esto es un texto en idioma Español.&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id="blk_2" style="display: none;"&gt;This is an English text.&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;One of the blocks has to be visible and the other ones invisibles so by default only one language will be shown.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Here, for clarity it has been added a return carriage to separate the divs but in the post the 'divs' shouldn't be separated. If not, the second language will appear with an extra line.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;It has been shown a very easy way to generate posts in two langages. This model it's also easily scalable to manage schemes with multiple languages.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-5860914298886555797?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/5860914298886555797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/01/textos-bilinges.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/5860914298886555797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/5860914298886555797'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/01/textos-bilinges.html' title='Textos bilingües'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-4772554935362016952</id><published>2009-01-17T19:52:00.003+01:00</published><updated>2009-04-26T17:52:47.450+02:00</updated><title type='text'>Prueba bilingüe</title><content type='html'>&lt;a href='#'&gt;&lt;span onclick="showBlk_1()"&gt;English&lt;/span&gt;&lt;/a&gt; &lt;a href='#'&gt;&lt;span onclick="showBlk_2()"&gt;Spanish&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="blk_1" class="blk_1" style="display: inline;"&gt;This is an English text.&lt;/div&gt;&lt;div id="blk_2" class="blk_2" style="display: none;"&gt;Esto es un texto en idioma Español.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-4772554935362016952?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/4772554935362016952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/01/prueba-bilinge.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/4772554935362016952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/4772554935362016952'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/01/prueba-bilinge.html' title='Prueba bilingüe'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-3419127871898106090</id><published>2009-01-10T20:54:00.001+01:00</published><updated>2009-01-10T21:06:38.336+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='paths'/><category scheme='http://www.blogger.com/atom/ns#' term='pathtracing'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><category scheme='http://www.blogger.com/atom/ns#' term='gravity'/><title type='text'>Gravity Paths</title><content type='html'>&lt;div style="text-align: justify;"&gt;Dejo aquí unos renders que hice hace poco. Representan las trayectorias de partículas con masa dentro de un campo gravitatorio arbitrario. Para realizarlo he partido de un objeto tridimensional. He calculado su campo gravitatorio. Luego he dejado dentro del campo un conjunto de partículas. Avanzando la simulación las partículas se mueven dentro del campo. Se pueden registrar sus trayectorias a medida que se mueven. Una vez que se obtienen las trayectorias se pueden convertir a objetos sólidos tubulares. Con el objeto sólido se puede realizar un render de pathtracing y obtener estos resultados:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SWj_BqAgmMI/AAAAAAAAACk/TpehJ1mWHBA/s1600-h/scene_trajectory.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SWj_BqAgmMI/AAAAAAAAACk/TpehJ1mWHBA/s320/scene_trajectory.jpg" alt="" id="BLOGGER_PHOTO_ID_5289758166268025026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SWj_B2ge-tI/AAAAAAAAACs/iXX743kXNgk/s1600-h/scene_trajectory_02.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SWj_B2ge-tI/AAAAAAAAACs/iXX743kXNgk/s320/scene_trajectory_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5289758169623362258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SWj_CB5mDYI/AAAAAAAAAC0/tzltEynkuNY/s1600-h/scene_trajectory_torus_knot_01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SWj_CB5mDYI/AAAAAAAAAC0/tzltEynkuNY/s320/scene_trajectory_torus_knot_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5289758172681473410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mvoUye45cQc/SWj_CWaMLtI/AAAAAAAAAC8/GYvMiP3z9RU/s1600-h/scene_trajectory_vicky_01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SWj_CWaMLtI/AAAAAAAAAC8/GYvMiP3z9RU/s320/scene_trajectory_vicky_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5289758178186899154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SWj_CoJ6PmI/AAAAAAAAADE/NzCmotgChdQ/s1600-h/scene_trajectory_vicky_02.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SWj_CoJ6PmI/AAAAAAAAADE/NzCmotgChdQ/s320/scene_trajectory_vicky_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5289758182950452834" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-3419127871898106090?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/3419127871898106090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/01/gravity-paths.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/3419127871898106090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/3419127871898106090'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/01/gravity-paths.html' title='Gravity Paths'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_mvoUye45cQc/SWj_BqAgmMI/AAAAAAAAACk/TpehJ1mWHBA/s72-c/scene_trajectory.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-4596713116779063802</id><published>2009-01-08T22:50:00.000+01:00</published><updated>2009-01-08T23:02:33.849+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='partition'/><category scheme='http://www.blogger.com/atom/ns#' term='woman'/><category scheme='http://www.blogger.com/atom/ns#' term='lattice'/><category scheme='http://www.blogger.com/atom/ns#' term='space'/><category scheme='http://www.blogger.com/atom/ns#' term='subdivision'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><category scheme='http://www.blogger.com/atom/ns#' term='escher'/><title type='text'>Lattice Object</title><content type='html'>&lt;div style="text-align: justify;"&gt;El otro día estuve mirando un libro de &lt;a href="http://es.wikipedia.org/wiki/Maurits_Cornelis_Escher"&gt;Escher&lt;/a&gt; que tengo desde hace tiempo. Hojeándolo llegué hasta uno de los dibujos que siempre me había sorprendido por su regularidad: "&lt;a href="http://www.smellslikepurple.com/esher/cubic_space_division_1952.jpg"&gt;Cubic Space Division&lt;/a&gt;" . Este dibujo se puede representar a mano con un poco de paciencia, cosa que les sobra a las computadoras. Así, que decidí realizar un pequeño programa que representara escenarios parecidos a ese dibujo.&lt;br /&gt;&lt;br /&gt;Cómo mostrar el espacio sin más es aburrido, decidí representar un enrejado acotado por la superficie de un objeto. Para ello utilicé una herramienta que codifiqué hace más o menos un año. La herramienta (una clase en C++) determina si un punto está dentro o fuera de un objeto cerrado. Esta herramienta se pensó para determinar el volumen de un objeto amén de utilizarse para obtener otras interesantes características como el tensor de inercia del sólido rígido que representaría. Para determinar el volumen, normalmente se eligen puntos aleatorios acotados dentro de una superfice que engloba el objeto y se haya una relación entre los que están dentro y los totales. Si esta relación se multiplica por el volumen acotado de la superficie englobante tenemos una aproximación del volumen. Estas técnicas de integración numérica son muy útiles cuando es muy complicado o imposible obtener una función analítica que represente la función de superficie que se desea integrar.&lt;br /&gt;&lt;br /&gt;Para realizar este modelo simplemente hay seleccionar puntos equiespaciados en los tres ejes espaciales y almacenar los que están dentro del objeto a analizar. Analizando la vecindad de los nodos (ver si tiene vecinos en los tres ejes y sus dos direcciones) se pueden añadir empalmes que parejas de éstos. Es necesario elegir cautelosamente los tamaños de los nodos y de los empalmes para que el armazón no englobe todo el espacio.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Dejo por aquí algunos renders. Una vista interior:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SWZ3EdPtLSI/AAAAAAAAACc/kLKhae8Pe-U/s1600-h/scene_sky_09.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SWZ3EdPtLSI/AAAAAAAAACc/kLKhae8Pe-U/s320/scene_sky_09.jpg" alt="" id="BLOGGER_PHOTO_ID_5289045730846911778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Otras exteriores...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SWZ3D_9bycI/AAAAAAAAACU/ad_BJ0CUN_U/s1600-h/scene_sky_08.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SWZ3D_9bycI/AAAAAAAAACU/ad_BJ0CUN_U/s320/scene_sky_08.jpg" alt="" id="BLOGGER_PHOTO_ID_5289045722985646530" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mvoUye45cQc/SWZ3Do3gUpI/AAAAAAAAACM/INCLSdQeems/s1600-h/scene_sky_07.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_mvoUye45cQc/SWZ3Do3gUpI/AAAAAAAAACM/INCLSdQeems/s320/scene_sky_07.jpg" alt="" id="BLOGGER_PHOTO_ID_5289045716786762386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SWZ3CvA3A-I/AAAAAAAAACE/EjoWW7wC99M/s1600-h/scene_sky_06.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SWZ3CvA3A-I/AAAAAAAAACE/EjoWW7wC99M/s320/scene_sky_06.jpg" alt="" id="BLOGGER_PHOTO_ID_5289045701256741858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Y una exterior más de cerca:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SWZ3CLAUcCI/AAAAAAAAAB8/RgWFENNRmVo/s1600-h/scene_sky_01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SWZ3CLAUcCI/AAAAAAAAAB8/RgWFENNRmVo/s320/scene_sky_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5289045691590799394" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-4596713116779063802?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/4596713116779063802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/01/lattice-object.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/4596713116779063802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/4596713116779063802'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/01/lattice-object.html' title='Lattice Object'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_mvoUye45cQc/SWZ3EdPtLSI/AAAAAAAAACc/kLKhae8Pe-U/s72-c/scene_sky_09.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-2147872083884153728</id><published>2009-01-04T15:46:00.000+01:00</published><updated>2009-01-04T15:53:43.814+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='broccoli'/><category scheme='http://www.blogger.com/atom/ns#' term='fractal'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><title type='text'>Brócoli con suelo liso</title><content type='html'>&lt;div style="text-align: justify;"&gt;Dejo por aquí otros dos renders del brócoli de Romanesco. He quitado el fondo de ajedrez como comentó Mamen.&lt;br /&gt;&lt;br /&gt;En este render el suelo es simplemente gris. El color azulado se debe a la radiancia que emite la cúpula celeste (si nos fijamos cuidadosamente veremos que en el mundo real pasa algo similar, las sombras diurnas son ligeramente azuladas).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SWDM9SFhQ4I/AAAAAAAAABE/2cmfKtDGnFU/s1600-h/scene_RomanescoBroccoli_02.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 287px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SWDMf9LXl1I/AAAAAAAAAA0/Ps2XClNjHMU/s320/clip_broccoli_sueloDifuso.jpg" alt="" id="BLOGGER_PHOTO_ID_5287450811903219538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;En este otro render he cambiado la BRDF del suelo de difusa a una de phong (con un exponente de 1024). El efecto conseguido es un suelo reflectante que dispersa parcialmente los rayos de luz que llegan. Los reflejos más distantes se vuelven más difusos. Obviamente el color azulado es debido al color del cielo.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SWDM9iioz_I/AAAAAAAAABM/wukBR9S2Bxc/s1600-h/scene_RomanescoBroccoli_03.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 291px; height: 320px;" src="http://4.bp.blogspot.com/_mvoUye45cQc/SWDMf7o24vI/AAAAAAAAAA8/BC-cPv1RTzU/s320/clip_broccoli_sueloPhong.jpg" alt="" id="BLOGGER_PHOTO_ID_5287450811490034418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-2147872083884153728?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/2147872083884153728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2009/01/brcoli-con-suelo-liso.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/2147872083884153728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/2147872083884153728'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2009/01/brcoli-con-suelo-liso.html' title='Brócoli con suelo liso'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_mvoUye45cQc/SWDMf9LXl1I/AAAAAAAAAA0/Ps2XClNjHMU/s72-c/clip_broccoli_sueloDifuso.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-3137435878119305901</id><published>2008-12-28T16:55:00.000+01:00</published><updated>2008-12-28T17:03:16.426+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='broccoli'/><category scheme='http://www.blogger.com/atom/ns#' term='fractal'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><title type='text'>El brócoli de Romanesco</title><content type='html'>&lt;div style="text-align: justify;"&gt;Recursividad y autosimilaridad, dos características propias de los fractales. La autosimilaridad es propia de la naturaleza y la recursividad de las computadoras. Está por lo tanto la naturaleza, ¿computada?. No lo creo, es más probable que simplemente sea el resultado de una compresión de datos a nivel genético y una optimización de los recursos desde un punto de vista evolutivo. En cualquier caso es fascinante.&lt;br /&gt;&lt;br /&gt;Las plantas son los seres vivos que mas relacionados están con la geometría fractal. El ejemplo clásico es el helecho (Fern) representado en otro 'post' mediante una técnica de IFS. Una técnica sorprendente dado que une el caos, la autosimilaridad y el orden en un único elemento. Representando puntos aleatorios y transformandolos usando una función iterada nace la autosimilaridad. Entrada aleatoria, mundo real; iteraciones, evolución. Personalmente no sé si la naturaleza funciona así, pero sus resultados son sorprendentes.&lt;br /&gt;&lt;br /&gt;Uno de los ejemplos que más me ha impresionado del mundo vegetal es el &lt;a title="Brócoli de Romanesco" href="http://en.wikipedia.org/wiki/Romanesco_broccoli"&gt;brocoli de Romanesco&lt;/a&gt;. Conos organizados en espiral con otros conos dentro de los primeros y así sucesivamente, de tal suerte que se organizan de forma esferoide maximizando el volumen, minimizando los huecos, siendo una figura óptima.&lt;br /&gt;&lt;br /&gt;Para representar por computadora este brócoli he utilizado simplemente un mecanismo recursivo. Siguiendo el concepto básico de función iterativa he partido de una matriz de transformación (identidad) que he ido rotando y escalando en cada iteración. Siendo el resultado de una iteración la fuente de la siguiente. Representando una esfera (o cualquier otro elemento) en el punto que determina la transformación de cualquier punto del espacio (constante en todo el proceso, por ejemplo (1,0,0) ) con dicha matriz se puede representar una forma. En este caso una espiral. Si se toma, para cada uno de esos puntos medidos en la primera pasada, su matriz de transformación asociada y se usa como matriz original de una nueva serie de transformaciones obtenemos el fenómeno de la autosimilaridad.&lt;br /&gt;&lt;br /&gt;Esta técnica no se puede llevar hasta niveles elevados (más de 3) porque el número de elementos crece rápidamente. En el ejemplo hay dos niveles de recursividad. Nótese, a modo de comparación con la naturaleza, el detalle que tiene la forma real y cómo la computación (¡tan solo visual!) de su homólogo virtual puede llegar a ser impracticable.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SVeiX3vRrUI/AAAAAAAAAAs/AROJhfYX7Ls/s1600-h/scene_RomanescoBroccoli_00.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SVeiX3vRrUI/AAAAAAAAAAs/AROJhfYX7Ls/s320/scene_RomanescoBroccoli_00.jpg" alt="" id="BLOGGER_PHOTO_ID_5284871218725498178" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-3137435878119305901?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/3137435878119305901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2008/12/el-brcoli-de-romanesco.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/3137435878119305901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/3137435878119305901'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2008/12/el-brcoli-de-romanesco.html' title='El brócoli de Romanesco'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_mvoUye45cQc/SVeiX3vRrUI/AAAAAAAAAAs/AROJhfYX7Ls/s72-c/scene_RomanescoBroccoli_00.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-2372966523158178178</id><published>2008-12-25T20:21:00.000+01:00</published><updated>2008-12-28T17:03:44.752+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='brdf'/><category scheme='http://www.blogger.com/atom/ns#' term='minnaert'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><title type='text'>Un cojín</title><content type='html'>&lt;div style="text-align: justify;"&gt;Dejo por aquí una primera prueba de un cojín. El cojín está modelado a mano. Sinceramente hubiera estado bien haber tenido algún programa de simulación física para realizar este tipo de modelos, pero por ahora a mano.&lt;br /&gt;&lt;br /&gt;Para el efecto de iluminación he usado una BRDF de Minnaert. Esta BRDF se caracteriza por aumentar la reflectancia en ángulos alejados a la normal, justo al contrario de la Lambertiana.&lt;br /&gt;&lt;br /&gt;Se pueden conseguir efectos similares al terciopelo. Os paso un pequeño render.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_mvoUye45cQc/SVPeI1Fk7lI/AAAAAAAAAAk/N7XXDNEOtp4/s1600-h/Cushion.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 270px;" src="http://1.bp.blogspot.com/_mvoUye45cQc/SVPeI1Fk7lI/AAAAAAAAAAk/N7XXDNEOtp4/s320/Cushion.png" alt="" id="BLOGGER_PHOTO_ID_5283811031106514514" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-2372966523158178178?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/2372966523158178178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2008/12/un-cojn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/2372966523158178178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/2372966523158178178'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2008/12/un-cojn.html' title='Un cojín'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_mvoUye45cQc/SVPeI1Fk7lI/AAAAAAAAAAk/N7XXDNEOtp4/s72-c/Cushion.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-7064697700086899964</id><published>2008-12-23T18:15:00.000+01:00</published><updated>2008-12-23T18:23:43.304+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fractal'/><category scheme='http://www.blogger.com/atom/ns#' term='ifs'/><title type='text'>Fractal Flame</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hoy he decidido revisar un módulo de fractales en C++ que empecé hace tiempo y lo he dejado bastante olvidado. Modificando ligeramente una función que calcula un fractal de tipo &lt;a title="Iterated Function System" href="http://en.wikipedia.org/wiki/Iterated_function_system"&gt;IFS&lt;/a&gt; se pueden conseguir curiosos efectos. Si se realizan principalmente dos transformaciones: Una espacial y otra de ajuste de tono, se pueden conseguir un tipo de fractales denominados &lt;a href="http://en.wikipedia.org/wiki/Fractal_flame"&gt;Fractal Flames&lt;/a&gt; (creados originalmente por Scott Draves).&lt;br /&gt;Este es el resultado de un programa que se puede desarrollar fácilmente (de media a una hora) para representar Fractal Flames.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SVEdt9I_7oI/AAAAAAAAAAU/JkvmIKXGVH8/s1600-h/FractalFlame.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 320px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SVEdt9I_7oI/AAAAAAAAAAU/JkvmIKXGVH8/s320/FractalFlame.png" alt="" id="BLOGGER_PHOTO_ID_5283036513225928322" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Obviamente, mejorando la paleta de colores (el ejemplo tiene dos colores) se pueden llegar a obtener mejores resultados.&lt;br /&gt;Si realmente os interesa explorar el mundo fractal de los IFS os recomiendo el software Apophysis. Para finalizar, os dejo un IFS bastante clásico, el del helecho.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SVEdutuMlXI/AAAAAAAAAAc/bEO6t3xdOkU/s1600-h/fern.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 320px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SVEdutuMlXI/AAAAAAAAAAc/bEO6t3xdOkU/s320/fern.png" alt="" id="BLOGGER_PHOTO_ID_5283036526266848626" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-7064697700086899964?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/7064697700086899964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2008/12/fractal-flame.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/7064697700086899964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/7064697700086899964'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2008/12/fractal-flame.html' title='Fractal Flame'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_mvoUye45cQc/SVEdt9I_7oI/AAAAAAAAAAU/JkvmIKXGVH8/s72-c/FractalFlame.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-398842201331776705.post-2458882063906991526</id><published>2008-12-22T18:27:00.000+01:00</published><updated>2008-12-22T18:33:10.157+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='woman'/><category scheme='http://www.blogger.com/atom/ns#' term='pinart'/><category scheme='http://www.blogger.com/atom/ns#' term='render'/><title type='text'>Simulación de PinArt</title><content type='html'>&lt;div style="text-align: justify;"&gt;El otro día me acordé de aquellos juguetes con los que podías hacer una réplica de un objeto con agujas. Podéis echarle un vistazo a lo que me refiero &lt;a title="Pin Art Gagdet" href="http://www.gadgetshop.com/Gadgets/FunGadgets/RetroGadgets/PRD%7E276402/Pin+Art+Pinpressions.jsp"&gt;aquí&lt;/a&gt;. Después de verlo me dije, por qué no hacer algo similar en 3D. Y aquí está.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_mvoUye45cQc/SU_O4OqQ07I/AAAAAAAAAAM/QZaljyBDF9c/s1600-h/PinArtObject.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://2.bp.blogspot.com/_mvoUye45cQc/SU_O4OqQ07I/AAAAAAAAAAM/QZaljyBDF9c/s320/PinArtObject.jpg" alt="" id="BLOGGER_PHOTO_ID_5282668353332237234" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Para realizar esta imagen tuve que hacer lo siguiente. Se parte de un modelo 3D. Este se puede hacer desde cero o se puede utilizar un modelo ya prehecho de &lt;a href="http://www.daz3d.com/"&gt;Daz3D&lt;/a&gt; y darle una pose utilizando Poser.&lt;br /&gt;&lt;br /&gt;Una vez que se tiene el modelo 3D, como una malla tridimensional es necesario transformarla a un objeto del estilo PinArt. Para ello es necesario crear en 3D las agujas. Esto se puede realizar con casi cualquier programa de modelado 3D.&lt;br /&gt;&lt;br /&gt;Ahora hay que dar una cierta altura a las agujas con respecto la información de altura del modelo. Aquí hay dos maneras de atacar el problema, a mano y a máquina. Se puede tomar un programa de modelado 3D e ir ajustando las alturas de los pines uno a uno. O como elegí yo, se puede codificar un pequeño programa que determina la altura del modelo para una posición dada. Esta elección es la correcta si se desean realizar renders de otros modelos 3D. Aparte, teniendo en cuenta el número de agujas, te puedes pegar un buen rato moviéndolas de arriba a abajo. Hay que tener en cuenta que el programa que calcula las alturas de las agujas debe componer un nuevo objeto para exportarlo.&lt;br /&gt;&lt;br /&gt;Para realizar el render he utilizado un programa de iluminación global codificado en C++. Se pueden usar programas comerciales o gratuitos como &lt;a title="Trazador de rayos Indigo" href="http://www.indigorenderer.com/joomla/"&gt;Indigo&lt;/a&gt;, o en mi caso, uno de fabricación propia.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/398842201331776705-2458882063906991526?l=voxelizer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://voxelizer.blogspot.com/feeds/2458882063906991526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://voxelizer.blogspot.com/2008/12/simulacin-de-pinart.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/2458882063906991526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/398842201331776705/posts/default/2458882063906991526'/><link rel='alternate' type='text/html' href='http://voxelizer.blogspot.com/2008/12/simulacin-de-pinart.html' title='Simulación de PinArt'/><author><name>José Félix Lucía</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_mvoUye45cQc/SU_O4OqQ07I/AAAAAAAAAAM/QZaljyBDF9c/s72-c/PinArtObject.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
