![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I have a weird problems with some prisms. Please see the file attached,
it's tiny example. As you can see, both hexagonal prisms and their
translations are calculated using school math; moreover, when it comes
to irrational floats, the same values are used whenever possible via
declaring the variable, so it have no choice but match. Still, there is
a gap between objects in vertical direction.
I'm out of ideas regarding the cause of it. Any inspiration?
Ilyich the Tod
Post a reply to this message
Attachments:
Download 'windows-1251' (2 KB)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ilya Razmanov <ily### [at] gmail com> wrote:
> I have a weird problems with some prisms. Please see the file attached,
> it's tiny example. As you can see, both hexagonal prisms and their
> translations are calculated using school math; moreover, when it comes
> to irrational floats, the same values are used whenever possible via
> declaring the variable, so it have no choice but match. Still, there is
> a gap between objects in vertical direction.
>
> I'm out of ideas regarding the cause of it. Any inspiration?
The geometry of the hexagons is off. Replacing all occurrences of 0.25 with
revsqrtof3/2 will fix it.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 26.01.2024 19:01, Cousin Ricky wrote:
> The geometry of the hexagons is off. Replacing all occurrences of 0.25 with
> revsqrtof3/2 will fix it.
Damn it. I mean, the most interesting part is that on a piece of paper I
was drawing it outer radius is marked as "a", while inner (which is 0.5
in this case) as b, and all the equations are correct. But in POVRay I
managed to mess with a and b. The most interesting part is, therefore,
what exactly I was thinking about while moving it from paper to POVRay.
Thank you very much. I'm pretty sure I'd never found this stupid mistake
myself.
Ilya
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> Ilya Razmanov <ily### [at] gmail com> wrote:
> >
> > I'm out of ideas regarding the cause of it. Any inspiration?
>
> The geometry of the hexagons is off.
Yes, that was my guess--although, I didn't know exactly why, so I started
measuring the render visually. The white lines connecting the points should be
equal lengths but are not.
I also superimposed a hexagon diagram from Wikipedia; it shows that the internal
angles are off a bit.
Post a reply to this message
Attachments:
Download 'hexagon_examples_kw.jpg' (60 KB)
Preview of image 'hexagon_examples_kw.jpg'
![hexagon_examples_kw.jpg](/povray.windows/attachment/%3Cweb.65b3eba7284cb76f9b4924336e066e29%40news.povray.org%3E/hexagon_examples_kw.jpg?ttop=443364&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 26.01.2024 20:28, Kenneth wrote:
> "Cousin Ricky" <rickysttATyahooDOTcom> wrote:
>> Ilya Razmanov <ily### [at] gmail com> wrote:
>
>>>
>>> I'm out of ideas regarding the cause of it. Any inspiration?
>>
>> The geometry of the hexagons is off.
>
> Yes, that was my guess--although, I didn't know exactly why, so I started
> measuring the render visually.
Thanks for illustration. As "Cousin Ricky" explained, I messed internal
and external diameters in some cases. That is, the values were correct
but these were correct values of *another* variable. How foolish of me.
Ilya.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 26/01/2024 17:01, Cousin Ricky wrote:
> Ilya Razmanov <ily### [at] gmail com> wrote:
>> I have a weird problems with some prisms. Please see the file attached,
>> it's tiny example. As you can see, both hexagonal prisms and their
>> translations are calculated using school math; moreover, when it comes
>> to irrational floats, the same values are used whenever possible via
>> declaring the variable, so it have no choice but match. Still, there is
>> a gap between objects in vertical direction.
>>
>> I'm out of ideas regarding the cause of it. Any inspiration?
>
> The geometry of the hexagons is off. Replacing all occurrences of 0.25 with
> revsqrtof3/2 will fix it.
>
>
Yes, som error in yours points.
Assuming that the first point of the prism is good : <-0.5,0.25>
We can easily calculate the radius of the center containing the hexagon
sqrt(-0.50*-0.50 + 0.25*0.25) = 0.559017 = r
Calculating all the points gives :
< 0.0000, 0.5590>
< 0.4841, 0.2795>
< 0.4841, -0.2795>
< 0.0000, -0.5590>
<-0.4841, -0.2795>
<-0.4841, 0.2795>
with :
x = r*sin(radians(a));
z = r*cos(radians(a));
'a' is the angle : 0, 60, 120, 180, 240, 300
Drawing these points near your prism give the attached image where the
different positions of the points are clearly visible.
Hope that help
--
Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message
Attachments:
Download 'prizm test 3.png' (3 KB)
Preview of image 'prizm test 3.png'
![prizm test 3.png](/povray.windows/attachment/%3C65b3f1ca%241%40news.povray.org%3E/prizm%20test%203.png?ttop=443364&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 26.01.2024 20:54, kurtz le pirate wrote:
>
> Assuming that the first point of the prism is good : <-0.5,0.25>
Assume object is supposed to be centered at 0,0 and have one of the
sizes 1.0; in this case - inner diameter 1.0. That gives us inner radius
0.5 and outer radius 2*0.5/sqrt(3), that is that very "revsqrtof3" in
source text.
As Cousin Ricky guessed, I, being a hodmandod ("Sam, is this a real
word?"), instead of revsqrtof3/2 wrote 0.5/2, that is, 0.25. That's the
only reason of the problem - I messed inner and outer. Since the error
is pretty irrational (even more irrational than sqrt(3)), I'm unlikely
to find it ever. Fortunately people here found the problem.
Oh, and why someone relatively sane may want a hexagonal prism have an
inner diameter of 1.0? To do pictures like attached easily, of course.
Ilyich the Toad
Post a reply to this message
Attachments:
Download 'p6.png' (320 KB)
Preview of image 'p6.png'
![p6.png](/povray.windows/attachment/%3C65b401c2%40news.povray.org%3E/p6.png?ttop=443364&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 1/26/24 14:02, Ilya Razmanov wrote:
> To do pictures like attached easily, of course.
I especially like the look of this one. Cool.
Bill P.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 27.01.2024 0:58, William F Pokorny wrote:
> I especially like the look of this one. Cool.
>
> Bill P.
Well, finally added this one to a collection of similar image to POV
converters at:
https://github.com/Dnyarri/POVmosaic
Taking into account their number and a possibility to tune resulting POV
files, it should be sufficient for creating funny posters, postcards,
greetings and so on for quite some time ;-)
Ilyich the Toad
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 1/26/24 20:02, Ilya Razmanov wrote:
> Oh, and why someone relatively sane may want a hexagonal prism have an
> inner diameter of 1.0? To do pictures like attached easily, of course.
Well done, bro !
--
+---------------------------------------------------------------------+
| https://tube.interhacker.space/a/tth/video-channels |
+---------------------------------------------------------------------+
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |