POV-Ray : Newsgroups : povray.general : uv mapping triangles in mesh {} Server Time
22 Dec 2024 02:22:37 EST (-0500)
  uv mapping triangles in mesh {} (Message 31 to 40 of 41)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 1 Messages >>>
From: Alain Martel
Subject: Re: uv mapping triangles in mesh {}
Date: 29 Mar 2023 12:30:59
Message: <642467c3$1@news.povray.org>
Le 2023-03-28 à 14:06, Bald Eagle a écrit :
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> 
>> But perhaps have to figure out how to mimic a python yield directive in SDL -
>> maybe TOK has some ideas on that.
> 
> I got the yield worked out, now I am trying to properly decipher these
> expressions:
> 
> //#local ta = (a - int(da <= 0) - fa) / da if da != 0 else float('inf');

int(da<=0) evaluate to 1 whenever da is zero or negative, and 0 if da is 
positive. The «int» does nothing as the <= operation returns ONLY 1 or 0.

As the else invert the result of the test,
«if da != 0 else» is the same as «if da = 0» of «if !da».

//#local ta = (a - da <=0 - fa) / da if !da float ('inf');

> 
> //#local ida = abs(1 / da) if da != 0 else float('inf');

//#local ida = abs(1 / da) if !da float('inf');
> 
> 
>


Post a reply to this message

From: Bald Eagle
Subject: Re: uv mapping triangles in mesh {}
Date: 29 Mar 2023 13:15:00
Message: <web.642471f7eebe912c1f9dae3025979125@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:

> int(da<=0) evaluate to 1 whenever da is zero or negative, and 0 if da is


Thanks, Alain.

OK - I thought that might be the case, but wasn't sure if it was some other
weird c++ assignment syntax.

I suppose I will just use some very large number to represent "inf".

- BW


Post a reply to this message

From: Paolo Gibellini
Subject: Re: uv mapping triangles in mesh {}
Date: 1 Apr 2023 15:10:06
Message: <6428818e$1@news.povray.org>
Il 26/03/2023 20:39, Bald Eagle wrote:

> All in all, not bad for a weekend of coding.

Decisively intriguing!

Paolo


Post a reply to this message

From: Bald Eagle
Subject: Re: uv mapping triangles in mesh {}
Date: 1 Apr 2023 17:00:00
Message: <web.64289a46eebe912c1f9dae3025979125@news.povray.org>
Paolo Gibellini <p.g### [at] gmailcom> wrote:
> Decisively intriguing!
> Paolo

Thanks, Paolo.   A lot of your work has been inspiring over the years.
Glad you like it.

I hunted down a few of the things that had been challenging my sanity, fixed
them, and then wanted to show how the patterns looked when assembled in
hexagons.

It worked, then suddenly didn't.

I was using a macro to translate the hexagon, using X and Y as arguments.
Somehow that really screwed things up, as changing that to XX and YY let things
work properly again.

Must be some kind of scope leakage or something.
I've been hitting a lot of weird things like this lately.


Hope you like.

- BW


Post a reply to this message


Attachments:
Download 'ternaryplot.png' (586 KB)

Preview of image 'ternaryplot.png'
ternaryplot.png


 

From: Bald Eagle
Subject: Re: uv mapping triangles in mesh {}
Date: 4 Apr 2023 16:40:00
Message: <web.642c8afbeebe912c1f9dae3025979125@news.povray.org>
At long last, I finally got the lines perpendicular to the edges properly
working, and added a few more patterns, which were waiting on solving that
problem.

On to calculating triangle pattern density, sorting, and trying a few more
pictures.

Then probably adding some colors and wood textures.


Post a reply to this message


Attachments:
Download 'ternaryplot.png' (390 KB)

Preview of image 'ternaryplot.png'
ternaryplot.png


 

From: yesbird
Subject: Re: uv mapping triangles in mesh {}
Date: 4 Apr 2023 17:32:35
Message: <642c9773@news.povray.org>
On 04/04/2023 23:39, Bald Eagle wrote:
> On to calculating triangle pattern density, sorting, and trying a few more
> pictures.
> 
> Then probably adding some colors and wood textures.

Really good !
Very perspective ornaments constructor - reminds me about celtic knots,
which I was fall in love many years ago.
--
YB


Post a reply to this message


Attachments:
Download 'knots.png' (1726 KB)

Preview of image 'knots.png'
knots.png


 

From: Thomas de Groot
Subject: Re: uv mapping triangles in mesh {}
Date: 5 Apr 2023 02:10:46
Message: <642d10e6$1@news.povray.org>
Excellent progress, sir!

-- 
Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: uv mapping triangles in mesh {}
Date: 5 Apr 2023 20:10:00
Message: <web.642e0d07eebe912c1f9dae3025979125@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Excellent progress, sir!

Thanks.  It's amazing what obsessing over the same ridiculous triangle diagram
for two weeks can accomplish.

{Mutters incoherently while fumbling with foil-wrapped vial of specially
prepared dried frog pills. =For Emergency Use Only=}


After I had gotten all of that sorted out to somewhat less than my satisfaction
(I still don't fully understand half of what I did with the logic and
"correction factors") I copied the working scene to another file, pasted in the
code to make a proper rectangle, daisy-chained together a bunch of arrays and
pattern-density calculating code, and rewrote Quicksort to handle my Nx3 data
array for the patterns.

(This looks fun.  I can learn a lot about triangles.   1618 lines of code
later...)

That confirmed what I had suspected - the actual area of a triangle covered in
black does not correspond to the perceived visual density of the pattern.  I
tried doing a few searches to see if there was some metric to measure this, and
if there was anything in the visual / psychological literature to account for
this and if it had a "name", and maybe some example diagrams and graphs, code,
or algorithms.

Looks like I'll have to do manual assignments or play with weighting the
contribution of lines based on their individual area and/or distance from the
center.

Because this is a BLACK cat with some white patches sitting on a cream colored
blanket.


Post a reply to this message


Attachments:
Download 'kumikophoto2_cropped.jpg' (1072 KB)

Preview of image 'kumikophoto2_cropped.jpg'
kumikophoto2_cropped.jpg


 

From: Bald Eagle
Subject: Re: uv mapping triangles in mesh {}
Date: 6 Apr 2023 20:10:00
Message: <web.642f5f43eebe912c1f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Looks like I'll have to do manual assignments or play with weighting the
> contribution of lines based on their individual area and/or distance from the
> center.

I haven't gone that far yet - I just adjusted a few things, and implemented a
quick and dirty way to add in some color.   Looks pretty good when scaled down
50%.


Post a reply to this message


Attachments:
Download 'kumikophoto2_resized.jpg' (163 KB)

Preview of image 'kumikophoto2_resized.jpg'
kumikophoto2_resized.jpg


 

From: Thomas de Groot
Subject: Re: uv mapping triangles in mesh {}
Date: 7 Apr 2023 03:52:21
Message: <642fcbb5$1@news.povray.org>
Op 7-4-2023 om 02:09 schreef Bald Eagle:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> 
>> Looks like I'll have to do manual assignments or play with weighting the
>> contribution of lines based on their individual area and/or distance from the
>> center.
> 
> I haven't gone that far yet - I just adjusted a few things, and implemented a
> quick and dirty way to add in some color.   Looks pretty good when scaled down
> 50%.
> 
I got the impression from your previous render that the 'dark' triangles 
contained too much 'white'. Why not use - for such an example - 
triangles going from (almost) black to (almost) white? That would make 
more sense to me, at least here. For different uses/purposes, obviously, 
you would need different types of triangles.

-- 
Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 1 Messages >>>

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