POV-Ray : Newsgroups : povray.advanced-users : Crushed box corner Server Time
23 Nov 2024 10:32:18 EST (-0500)
  Crushed box corner (Message 1 to 6 of 6)  
From: Bald Eagle
Subject: Crushed box corner
Date: 29 Jan 2018 09:10:01
Message: <web.5a6f2aee622a77f5c437ac910@news.povray.org>
I'm looking to model a crushed box corner.

This is likely something trivial to do in a mesh-based package like Blender,
etc, but it seems to me to be rather complicated to work out the mechanism by
which to model the folding of the faces and especially the corner - where there
is by necessity actual crushing.

I was wondering if anyone's ever thought about, read about, or experimentes with
deforming a mesh like this.

The only thing I've found so far that's even remotely similar is "mesh
crumpling" by Paul Bourke:
http://paulbourke.net/geometry/polygonmesh/

But that's not anything like crushing a corner in one direction.


Post a reply to this message

From: clipka
Subject: Re: Crushed box corner
Date: 29 Jan 2018 10:46:20
Message: <5a6f41cc$1@news.povray.org>
Am 29.01.2018 um 15:08 schrieb Bald Eagle:
> I'm looking to model a crushed box corner.
> 
> This is likely something trivial to do in a mesh-based package like Blender,
> etc, but it seems to me to be rather complicated to work out the mechanism by
> which to model the folding of the faces and especially the corner - where there
> is by necessity actual crushing.
> 
> I was wondering if anyone's ever thought about, read about, or experimentes with
> deforming a mesh like this.
> 
> The only thing I've found so far that's even remotely similar is "mesh
> crumpling" by Paul Bourke:
> http://paulbourke.net/geometry/polygonmesh/
> 
> But that's not anything like crushing a corner in one direction.

Maybe Koppi's Playground has some tools for this?


Post a reply to this message

From: William F Pokorny
Subject: Re: Crushed box corner
Date: 29 Jan 2018 11:28:47
Message: <5a6f4bbf$1@news.povray.org>
On 01/29/2018 09:08 AM, Bald Eagle wrote:
> I'm looking to model a crushed box corner.
> 
> This is likely something trivial to do in a mesh-based package like Blender,
> etc, but it seems to me to be rather complicated to work out the mechanism by
> which to model the folding of the faces and especially the corner - where there
> is by necessity actual crushing.
> 
Understand your looking for mesh functionality, but you can fairly 
quickly get a dented box look with an isosurface by routing a box 
function through pigment(1) so as to have access to the pigment pattern 
modifiers.

Bill P.

(1) - The pigment wrapper slows things down quite a bit. I'm not aware 
of a better way at the moment - at least one which is relatively quick 
to code.

//--------------- dentedBox.pov
#version 3.8;
global_settings { assumed_gamma 1 }
#default { finish {ambient 0.000 diffuse 1.0} }
#declare Grey50 = srgb <0.5,0.5,0.5>;
background { color Grey50 }
#declare Camera00 = camera {
     perspective
     location <3,3,-3.001>
     sky y
     angle 35
     right x*(image_width/image_height)
     look_at <0,0,0>
}
#declare White = srgb <1,1,1>;
#declare Light00 = light_source {
     <150,150,-250>, White*<0.3,0.1,0.0>
}
#declare Red = srgb <1,0,0>;
#declare CylinderX = cylinder { -1*x, 1*x, 0.01 pigment { Red } }
#declare Green = srgb <0,1,0>;
#declare CylinderY = cylinder { -1*y, 1*y, 0.01 pigment { Green } }
#declare Blue = srgb <0,0,1>;
#declare CylinderZ = cylinder { -1*z, 1*z, 0.01 pigment { Blue } }
#include "functions.inc"
#declare Fn00 = function (x,y,z) {
     -min(0,f_rounded_box(x,y,z,0.05,0.9,0.9,0.9))
     // NOTE. The corner rounding value (0.05) is the most
     // negative value as f_rounded_box implemented. Smaller
     // values likely to drive up run time & drive tweak of
     // isosurface function call.
}
#declare Pigment00 = pigment {
     function { Fn00(x,y,z) }
     warp {black_hole <0.7,0.6,0.2>, 0.7 strength 1 falloff 2 inverse}
     warp {black_hole <0.7,0.7,0>, 0.5 strength 1 falloff 2}
     warp {black_hole <0.7,0.7,0>, 0.6 strength 1 falloff 2}
     warp {black_hole <0.7,0.7,0>, 0.7 strength 1 falloff 2}
     warp {turbulence 0.02}
}
#declare Fn01 = function { pigment { Pigment00 } }
#declare Iso99 = isosurface {
     function { 0.025-Fn01(x,y,z).red }
     contained_by { box { <-1,-1,-1>,<1,1,1> } }
     threshold 0.0
     accuracy 0.0005
     max_gradient 3.0
     texture {
         pigment { color White*0.7 }
         normal { wrinkles 0.9 scale 0.01 }
     }
}

//--- scene ---
    camera { Camera00 }
    light_source { Light00 }
    object { CylinderX }
    object { CylinderY }
    object { CylinderZ }
    object { Iso99 }
//--- end


Post a reply to this message

From: Bald Eagle
Subject: Re: Crushed box corner
Date: 29 Jan 2018 21:50:01
Message: <web.5a6fdd3c85506b565cafe28e0@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> Understand your looking for mesh functionality, but you can fairly
> quickly get a dented box look with an isosurface by routing a box
> function through pigment(1) so as to have access to the pigment pattern
> modifiers.

That, Sir, is a fascinating approach, and the iterative black hole warps are an
interesting way to "crinkle" the edge.

I had to increase the strength to 4 to see what was really going on there.

I will think on this some more - even if not perfectly suitable to the "My
parcel got squished" look at hand, this certainly is an inspiring method - all
sorts of possibilities.

Thank you for that unexpected intellectual bright spot in an otherwise
stultifying day  :)


Post a reply to this message

From: Thomas de Groot
Subject: Re: Crushed box corner
Date: 30 Jan 2018 02:54:04
Message: <5a70249c$1@news.povray.org>
Hmm... you may want to look up Christoph Hormann's site: Mechanics 
simulation.

http://www.imagico.de/pov/tools_en.php

-- 
Thomas


Post a reply to this message

From: William F Pokorny
Subject: Re: Crushed box corner
Date: 30 Jan 2018 07:11:03
Message: <5a7060d7$1@news.povray.org>
On 01/29/2018 09:49 PM, Bald Eagle wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
> 
>> Understand your looking for mesh functionality, but you can fairly
>> quickly get a dented box look with an isosurface by routing a box
>> function through pigment(1) so as to have access to the pigment pattern
>> modifiers.
> 
> That, Sir, is a fascinating approach, and the iterative black hole warps are an
> interesting way to "crinkle" the edge.
> 
> I had to increase the strength to 4 to see what was really going on there.
> 
> I will think on this some more - even if not perfectly suitable to the "My
> parcel got squished" look at hand, this certainly is an inspiring method - all
> sorts of possibilities.
> 
> Thank you for that unexpected intellectual bright spot in an otherwise
> stultifying day  :)
> 
> 
Happy to help with the anti-stultifying - if nothing else. :-)

I admit to not spending much time positioning the black_holes in the 
example scene. Also remember in the shipped version of POV-Ray, we are 
somewhat limited in what can be done with black_hole warps. The pulling 
black_hole in fact clamps at strengths above 1 and can pull coordinates 
from outside the range of the sphere depending on usage. The clamping 
behavior can be very useful for effects, but it isn't very black hole 
like in general. The clamping behavior is why I left the strength in my 
example at 1.

A while back I posted some images for a proposed 'type 1' set of 
black_holes which fixes the pulling black hole while leaving the inverse 
behavior as is. I always planned to try additional types in addition to 
the pulling fix - including one that ripples about an axis in the 
sphere. Not too long ago, I  closed my github pull req for the new 'type 
1' to work on others - and promptly got distracted. :-) I am keeping the 
'black_hole type 1' feature branch on github current with master should 
anyone want to pull it into their private POV-Ray compiles as I do mine. 


Bill P.


Post a reply to this message

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