|
|
On 11/12/24 03:17, William F Pokorny wrote:
> Thanks for the references. IIRC shadertoy has a distance method to draw
> the outline of cells, but I don't recalled the particulars at the
> moment. I have ideas for how to do it in C++, but I also wonder if in
> yuqk it cannot already 'mostly' be done. Stuff like this why I added the
> ip_raw_return as a yuqk crackle option. Maybe I'll take a 'crack' at it
> in a bit.
I didn't spend much time on it, but the top of the attached image shows
outlines as a pigment just slightly red (negative) by allowing raw value
returns after changing ip_form to: 'ip_form <-0.1,0.08,0> - the default
is <-1,1,0>.
The bottom of the image is an isosurface where a cylindrical shell is
intersected with a similar crackle pattern in space. No attempt wrap the
cylinder - just punching out a thin part of the crackle cell outlines.
The isosurface functions are:
// yuqk required
#declare Fn00 = function (x,y,z) {
f_planar(f_cylinder(x,y,z,0.9),0.01,1)
}
#declare FnCrk = function {
pattern {
crackle
ip_form <-0.1,0.097,0>
ip_strength <0.25,0.25,0.25>
ip_raw_return
raw_wave
translate <0,0,0.25>
scale 1/5
}
}
#declare Fn01 = function (x,y,z) { max(Fn00(x,y,z),FnCrk(x,y,z)) }
Yes, The outline / cell-walls vary some due differences in gradients -
but more due how the slices catch the cell wall. For practical purposes,
expect an approach like this often OK for cell outlines.
Bill P.
Post a reply to this message
Attachments:
Download 'be_crk.jpg' (124 KB)
Preview of image 'be_crk.jpg'
|
|