POV-Ray : Newsgroups : povray.binaries.images : Strange Artifacts Server Time
30 Jul 2024 18:10:22 EDT (-0400)
  Strange Artifacts (Message 6 to 15 of 25)  
<<< Previous 5 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Le Forgeron
Subject: Re: Strange Artifacts
Date: 30 Sep 2011 15:53:52
Message: <4e861e50$1@news.povray.org>
Le 30/09/2011 20:21, clipka nous fit lire :
> Am 30.09.2011 11:47, schrieb Jörg 'Yadgar' Bleimann:
>> Hi(gh)!
>>
>> With my current house project ("Port Whatmough Residential Area") I
>> encountered some strange artifacts when I tried to join two segments of
>> a roof railing (a straight and a curved one) with a sphere.
>>
>> The curved segment follows a rounded 90° cutout of the ground floor
>> having a radius of 3.5 units; as the railing generally is spaced 0.1
>> units inwards from the roof's eged, the curved segment's (technically a
>> section of a torus) radius is 3.6 units, therefore it's angular size is
>> slightly less than 90° (see second attached image).
>>
>> Although I've taken the resulting difference in the x direction (which
>> calculates as cos(atan(0.1/3.6))*3.6) relative to the eastern end of the
>> straight section into account, the spherical cornerpiece still does not
>> fit seamlessly.
> 
> I think that should be:
> 
>     cos(asin(0.1/3.6))*3.6
>   = sqrt(sqr(3.6)-sqr(0.1))
> 
> In addition, are you sure you cut the cylinder and torus properly?

If, as I now think, he used a translation of the clipping plane, the
answer is no. (a rotation should have been used)


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Strange Artifacts
Date: 30 Sep 2011 17:05:51
Message: <4e862f2f$1@news.povray.org>
Hi(gh)!

Am 30.09.2011 21:53, schrieb Le_Forgeron:

>> In addition, are you sure you cut the cylinder and torus properly?
>
> If, as I now think, he used a translation of the clipping plane, the
> answer is no. (a rotation should have been used)

The cylinder is not cut at all, but defined according to the length of 
the straight rail piece, with equal y and z coordinates respectively at 
beginning and end, so there is no distortion. The torus is defined in 
default position, i. e. parallel to the x-z plane and cut by two boxes 
rotated only around the y axis, so the cut planes are always circles, 
not ellipses!

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Strange Artifacts
Date: 30 Sep 2011 17:38:36
Message: <4e8636dc@news.povray.org>
Hi(gh)!

> I think that should be:
>
> cos(asin(0.1/3.6))*3.6
> = sqrt(sqr(3.6)-sqr(0.1))

With

<4.9+(3.6-sqrt(sqrt(3.6)-sqrt(0.1))), sh+rfh/(mr+1), 4.1>

as the sphere's coordinates rather than

<4.9+(3.6-cos(atan(0.1/3.6))*3.6), sh+rfh/(mr+1), 4.1>

the result is even worse - see attached image!

See you in Khyberspace!

Yadgar


Post a reply to this message


Attachments:
Download 'railing_corner.png' (19 KB)

Preview of image 'railing_corner.png'
railing_corner.png


 

From: clipka
Subject: Re: Strange Artifacts
Date: 30 Sep 2011 21:20:03
Message: <4e866ac3$1@news.povray.org>

> Hi(gh)!
>
>> I think that should be:
>>
>> cos(asin(0.1/3.6))*3.6
>> = sqrt(sqr(3.6)-sqr(0.1))
>
> With
>
> <4.9+(3.6-sqrt(sqrt(3.6)-sqrt(0.1))), sh+rfh/(mr+1), 4.1>
> [...]
> the result is even worse - see attached image!

Of course: You mixed up sqrt and sqr :-P

My bad though, because sqr doesn't exist as a predefined formula in 
POV-Ray; so it should be:

   sqrt(3.6*3.6 - 0.1*0.1)


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Strange Artifacts
Date: 1 Oct 2011 13:26:28
Message: <4e874d44@news.povray.org>
Hi(gh)!

Am 01.10.2011 03:19, schrieb clipka:
> Of course: You mixed up sqrt and sqr :-P
>
> My bad though, because sqr doesn't exist as a predefined formula in
> POV-Ray; so it should be:
>
>    sqrt(3.6*3.6 - 0.1*0.1)

Now the result is the same like with my original version (see attachment)...

See you in Khyberspace!

Yadgar


Post a reply to this message


Attachments:
Download 'whatmough_residential.png' (29 KB)

Preview of image 'whatmough_residential.png'
whatmough_residential.png


 

From: clipka
Subject: Re: Strange Artifacts
Date: 1 Oct 2011 18:45:01
Message: <4e8797ed$1@news.povray.org>


> Now the result is the same like with my original version (see
> attachment)...

I can't help but think that the torus and cylinder ends might be bogus.

Do you have some code for me to toy around with?


Post a reply to this message

From: Solar Mike
Subject: Re: Strange Artifacts
Date: 1 Oct 2011 20:45:01
Message: <web.4e87b3292d6bb20470368d3d0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> > Now the result is the same like with my original version (see
> > attachment)...
>
> I can't help but think that the torus and cylinder ends might be bogus.
>
> Do you have some code for me to toy around with?

Also, an orthographic view from above could be illuminating.  Even if your
angles are correct it looks like the issue could be due to a miss calculation of
the torus center or radius.

Cheers,
Mike


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Strange Artifacts
Date: 2 Oct 2011 06:45:17
Message: <4e8840bd$1@news.povray.org>
Am 02.10.2011 00:44, schrieb clipka:

>
>> Now the result is the same like with my original version (see
>> attachment)...
>
> I can't help but think that the torus and cylinder ends might be bogus.
>
> Do you have some code for me to toy around with?

O.k., here it is:

#declare rfh = 1; // Roof railing total height
#declare ur = 0.025; // Upper rail radius
#declare or = 0.018; // Other rails' radius
#declare pr = 0.018; // Railing post radius
#declare cp = 0.08;  // Rail cornerpieces' radius
#declare fh = 0.02;  // Railing post foot height
#declare fpr = 0.005; // Railing post foot outer rounding radius
#declare jlt = 0.012; // Railing middle join loop thickness
#declare jlr = 0.005; // Railing middle join loop outer rounding radius
#declare jlw = 2*(jlr+pr); // Railing middle join loop width
#declare mr = 2;      // Number of middle rails
#declare rvsp = rfh/(mr+1); // Vertical spacing of rails

#declare F_Shiny =
finish
{
   diffuse 1
   brilliance 0.6
   specular 0.8
   roughness 0.05
}

#declare T_Red_Metal =
texture
{
   pigment { color rgb <0.8, 0, 0> }
   finish { F_Shiny }
}



   cylinder
   {
     <2.1+cp, sh+2*rfh/(mr+1), 4.1>, <4.9, sh+2*rfh/(mr+1), 4.1>, or
     texture { T_Red_Metal }
   }

   sphere
   {
   // sqrt(sqr(3.6)-sqr(0.1))
   // <4.9+(3.6-cos(atan(0.1/3.6))*3.6), sh+rfh/(mr+1), 4.1>, or
     <4.9+(3.6-sqrt(pow(3.6, 2)-pow(0.1, 2))), sh+rfh/(mr+1), 4.1>, or
     texture { T_Red_Metal }
   }

   difference // ground floor round cutout railing, lower rail
   {
     torus
     {
       3.6, or
     }
     box
     {
       <0, -(or+df), -(3.6+or+df)>, <3.6+or+df, or+df, 3.6+or+df>
     }
     box
     {
       <-(3.6+or+df), -(or+2*df), -(3.6+or+2*df)>, <3.6+or+2*df, or+2*df, 0>
       rotate <0, degrees(atan(0.1/3.5)), 0>
     }
     translate <8.5, sh+rfh/3, 4>
     texture { T_Red_Metal }
   }

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Strange Artifacts
Date: 2 Oct 2011 07:00:46
Message: <4e88445e@news.povray.org>
Hi(gh)!

Am 02.10.2011 02:41, schrieb Solar Mike:

> Also, an orthographic view from above could be illuminating.  Even if your
> angles are correct it looks like the issue could be due to a miss calculation of
> the torus center or radius.

O.k.... with and without the spherical cornerpiece!

See you in Khyberspace!

Yadgar


Post a reply to this message


Attachments:
Download 'orthoview1.png' (66 KB) Download 'orthoview2.png' (65 KB)

Preview of image 'orthoview1.png'
orthoview1.png

Preview of image 'orthoview2.png'
orthoview2.png


 

From: clipka
Subject: Re: Strange Artifacts
Date: 2 Oct 2011 07:14:15
Message: <4e884787$1@news.povray.org>


> cylinder
> {
> <2.1+cp, sh+2*rfh/(mr+1), 4.1>, <4.9, sh+2*rfh/(mr+1), 4.1>, or
                                    ~~~
Note that this does /not/ coincide with the sphere's center. You need to 
apply the small correction here as well to fix this...

> sphere
> {
> // sqrt(sqr(3.6)-sqr(0.1))
> // <4.9+(3.6-cos(atan(0.1/3.6))*3.6), sh+rfh/(mr+1), 4.1>, or
> <4.9+(3.6-sqrt(pow(3.6, 2)-pow(0.1, 2))), sh+rfh/(mr+1), 4.1>, or
> texture { T_Red_Metal }
> }

> difference // ground floor round cutout railing, lower rail
> {
> torus
> {
> 3.6, or
> }
> box
> {
> <0, -(or+df), -(3.6+or+df)>, <3.6+or+df, or+df, 3.6+or+df>
> }
> box
> {
> <-(3.6+or+df), -(or+2*df), -(3.6+or+2*df)>, <3.6+or+2*df, or+2*df, 0>
> rotate <0, degrees(atan(0.1/3.5)), 0>
                      ~~~~     ~~~
... and here you're miscalculating the angle, using both the wrong 
values (should be 0.1/3.6 rather than 0.1/3.5) and the wrong formula 
(should be asin rather than atan).


Post a reply to this message

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

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