POV-Ray : Newsgroups : povray.binaries.images : A nice tiling macro Server Time
18 Aug 2024 16:19:29 EDT (-0400)
  A nice tiling macro (Message 1 to 7 of 7)  
From: John VanSickle
Subject: A nice tiling macro
Date: 19 Apr 2001 15:43:34
Message: <3ADF405C.22C3478@erols.com>
-- 
ICQ: 46085459


Post a reply to this message


Attachments:
Download 'tile.jpg' (192 KB)

Preview of image 'tile.jpg'
tile.jpg


 

From: Christoph Hormann
Subject: Re: A nice tiling macro
Date: 19 Apr 2001 16:08:19
Message: <3ADF45B4.1867DBCE@gmx.de>
Separate objects or pattern with repeat warps etc?

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: John VanSickle
Subject: Re: A nice tiling macro
Date: 19 Apr 2001 16:42:08
Message: <3ADF4E63.2C502498@erols.com>
Christoph Hormann wrote:
> 
> Separate objects or pattern with repeat warps etc?

Pattern only.

Regards,
John

// The macro code
#macro OctoTile(OctA,OctB,Square,Fill,W)
#local tS= texture { Square Matrix((x+z)/2,y,(z-x)/2,<0,0,0>) }
#if(W<=0)
  #local tC= texture { checker texture { OctA }, texture { OctB }
  Matrix((x+z)/2,y,(z-x)/2,<0,0,0>) }
  #local iA=.5-sqrt(.125);
  #local iB=sqrt(.125);
  #local iC=1-sqrt(.125);
  #local iD=.5+sqrt(.125);
  #local tA= texture { gradient x texture_map {
    [iA tS][iA tC][iD tC][iD tS] } }
  #local tB= texture { gradient x texture_map {
    [iB tC][iB tS][iC tS][iC tC] } }
  gradient z Matrix ( x-z,y,x+z,<0,0,0>) texture_map {
  [iA tA][iA tC][iB tC][iB tB][iC tB][iC tC][iD tC][iD tA] }
#else
  #local tC= texture { checker texture { OctA }, texture { OctB } }
  #local tX= texture { gradient x texture_map {
    [W/2 Fill][W/2 tC][1-W/2 tC][1-W/2 Fill] } }
  #local tZ= texture { gradient z texture_map {
    [W/2 Fill][W/2 tX][1-W/2 tX][1-W/2 Fill] }
    Matrix((x+z)/2,y,(z-x)/2,<0,0,0>) }
  #local tF= texture { Fill Matrix((x+z)/2,y,(z-x)/2,<0,0,0>) }
  #local iA=.5-sqrt(.125)*(1+W);
  #local iB=.5-sqrt(.125)*(1-W);
  #local iC=.5+sqrt(.125)*(1-W);
  #local iD=.5+sqrt(.125)*(1+W);
  #local tA=texture { gradient x texture_map {
    [iA tS][iA tF][iB tF][iB tZ][iC tZ][iC tF][iD tF][iD tS] } }
  #local iE=sqrt(.125)*(1-W);
  #local iF=sqrt(.125)*(1+W);
  #local iG=1-sqrt(.125)*(1+W);
  #local iH=1-sqrt(.125)*(1-W);
  #local tB=texture { gradient x texture_map {
    [iE tZ][iE tF][iF tF][iF tS][iG tS][iG tF][iH tF][iH tZ] } }
  #local tC=texture { gradient x texture_map {
    [iB tF][iB tZ][iC tZ][iC tF] } }
  #local tD=texture { gradient x texture_map {
    [iE tZ][iE tF][iH tF][iH tZ] } }
  #local sDummy=0;
  gradient z Matrix(x-z,y,x+z,<0,0,0>) texture_map {
  [iA tA][iA tC][iB tC][iB tZ][iE tZ][iE tD][iF tD][iF tB]
  [iG tB][iG tD][iH tD][iH tZ][iC tZ][iC tC][iD tC][iD tA] }
#end
#end

// to use it

plane { y,0
  texture {
    OctoTile(OctText1,OctText2,SquareText,FillText,FillWidth)
  }
}


Post a reply to this message

From: Ron Parker
Subject: Re: A nice tiling macro
Date: 19 Apr 2001 16:53:48
Message: <slrn9duk2t.pl.ron.parker@fwi.com>
On Thu, 19 Apr 2001 22:45:23 +0200, John VanSickle wrote:
>Christoph Hormann wrote:
>> 
>> Separate objects or pattern with repeat warps etc?
>
>Pattern only.

Clearly great minds do think alike.  Y'all should go over to p.t.scene-files
and check out the interesting tiling macros I've been posting there, if you
haven't already.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Sander
Subject: Re: A nice tiling macro
Date: 20 Apr 2001 03:45:52
Message: <MPG.154a07a733259fcc989748@NEWS.POVRAY.ORG>
In article <slr### [at] fwicom>, Ron Parker says...
> On Thu, 19 Apr 2001 22:45:23 +0200, John VanSickle wrote:
> 
> Clearly great minds do think alike.  Y'all should go over to p.t.scene-files
> and check out the interesting tiling macros I've been posting there, if you
> haven't already.
> 
I am becoming increasingly unhappy, not only because I can't do things 
like these, but also because I don't understand how they work. :((
But these 'things' are very nice indeed! Lucky you!

-- 
Regards,  Sander


Post a reply to this message

From: Ron Parker
Subject: Re: A nice tiling macro
Date: 20 Apr 2001 09:34:09
Message: <slrn9e0emi.1cb.ron.parker@fwi.com>
On Fri, 20 Apr 2001 09:46:08 +0200, Sander wrote:
>I am becoming increasingly unhappy, not only because I can't do things 
>like these, but also because I don't understand how they work. :((
>But these 'things' are very nice indeed! Lucky you!

I could give a try to explaining one of the simpler ones, if there's 
popular demand.  I won't try to explain 3, though.  That requires large
amounts of caffeine.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Geoff Wedig
Subject: Re: A nice tiling macro
Date: 20 Apr 2001 11:07:32
Message: <3ae050b4@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote:

> On Fri, 20 Apr 2001 09:46:08 +0200, Sander wrote:
>>I am becoming increasingly unhappy, not only because I can't do things 
>>like these, but also because I don't understand how they work. :((
>>But these 'things' are very nice indeed! Lucky you!

> I could give a try to explaining one of the simpler ones, if there's 
> popular demand.  I won't try to explain 3, though.  That requires large
> amounts of caffeine.

Yeah, it's kinda ugly.  I see how it works.  It's much like some of my
complex textures, layers upon layers of stuff to break up and sort and
reorganize.

The basic system (like 1), is pretty easy to understand, as it's the same
basic mechanizm as a kalaidescope.

Geoff


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.