!BbbouYwtinZcRySkDA:matrix.org

Curv

323 Members
A language for making art using mathematics | http://curv3d.org | Playground: https://curv.leefallat.ca/ | Ask your question!5 Servers

Load older messages


SenderMessageTime
8 Aug 2024
@zabojeb:matrix.orgzabojeb changed their profile picture.14:48:13
21 Sep 2024
@3dlirious:matrix.org3dlirious
In reply to @lf94:matrix.org
Just wanted to say, great stuff 3dlirious :)
Hey @Lee ! My apologies, I had intended to write something back to you earlier, but I guess I never did. Thanks for stopping by and the kind words. Appreciate all the work you did in Curv as well!
18:14:40
@3dlirious:matrix.org3dlirious
In reply to @lf94:matrix.org
Just wanted to say, great stuff 3dlirious :)
* Hey @Lee:matrix.org ! My apologies, I had intended to write something back to you earlier, but I guess I never did. Thanks for stopping by and the kind words. Appreciate all the work you did in Curv as well!
18:15:15
@3dlirious:matrix.org3dlirious * Hey https://matrix.to/#/@Lee:matrix.org ! My apologies, I had intended to write something back to you earlier, but I guess I never did. Thanks for stopping by and the kind words. Appreciate all the work you did in Curv as well! 18:20:19
@3dlirious:matrix.org3dlirious * Hey Lee! My apologies, I had intended to write something back to you earlier, but I guess I never did. Thanks for stopping by and the kind words. Appreciate all the work you did in Curv as well! 18:21:35
@3dlirious:matrix.org3dlirious * Hey Lee ! My apologies, I had intended to write something back to you earlier, but I guess I never did. Thanks for stopping by and the kind words. Appreciate all the work you did in Curv as well! 18:23:10
@3dlirious:matrix.org3dlirious * Hey @lf94:matrix.org ! My apologies, I had intended to write something back to you earlier, but I guess I never did. Thanks for stopping by and the kind words. Appreciate all the work you did in Curv as well! 18:23:34
@3dlirious:matrix.org3dlirious * Hey https://matrix.to/#/@lf94:matrix.org ! My apologies, I had intended to write something back to you earlier, but I guess I never did. Thanks for stopping by and the kind words. Appreciate all the work you did in Curv as well! 18:24:00
@3dlirious:matrix.org3dliriousIt's been a busy few months, and LOTS of new features and enhancements have made it into Curv. I've finished up the documentation, so I figure it's probably time for a bit of an update. There's way too much to list here, so I'll just try to hit the highlights.18:29:07
@3dlirious:matrix.org3dliriousbezier2_polyline_test_1.png
Download bezier2_polyline_test_1.png
18:30:05
@3dlirious:matrix.org3dlirious
  • Over 40 (I lost count) new primitives, mostly 2D and mostly exact distance fields. Some are in std.curv, but most are in the new lib.shapes2d library. Shapes include stars, a moon, heart, stroke arc, and exact quadratic bezier curves! All are documented with examples.
18:30:10
@3dlirious:matrix.org3dlirioustwist_ladder_ex_1.png
Download twist_ladder_ex_1.png
18:31:18
@3dlirious:matrix.org3dlirious
  • Enhancements to nearly all of the operators, including move, rotate, reflect, stretch, shear, local_taper, bend, repeat, mirror, slice, and loft. New about and align operators. Many operators now include "dot axis" shortcuts, where you can select the applicable axis or direction of the operator by by adding e.g. .x, .y or .z to the end of the operator. More examples added to the documentation.

For example, here's an infinite ladder created from only 2 cylinders, using the 'dot axis' shortcuts:

let width = 4; in
union [ cylinder {d:0.5,  h:inf}   >> move.x (width/2) >> mirror.x,
        cylinder {d:0.25, h:width} >> rotate.y (tau/4) >> repeat.z 1 ]

This is shorter (and more readable IMO) than the equivalent:

union [ cylinder {d:0.5, h:inf}    >> move [width/2, 0] >> mirror X_axis,
        cylinder {d:0.25, h:width} >> rotate {axis=Y_axis, angle=tau/4} >> repeat.z 1 ]

And if you give this shape a twist, you have an infinite strand of DNA (constructed very inexpensively).

18:32:05
@3dlirious:matrix.org3dliriousDocs: https://codeberg.org/doug-moen/curv/src/branch/master/docs/shapes/Transformations.rst18:32:29
@3dlirious:matrix.org3dlirioushttps://codeberg.org/doug-moen/curv/src/branch/master/docs/shapes/Repetition.rst18:32:34
@3dlirious:matrix.org3dlirious
  • Lots of bug fixes, and a few language enhancements as well (such as equality pattern matching). Doug's been great about squashing bugs almost as soon as I find them. This also means that you will need to recompile in order to use these new features, as some depend on these fixes.
  • The project homepage has been migrated to Codeberg and is now hosted directly from within the main repository. It is also now the permanent home of the [Cheat Sheet]https://curv3d.org/cheatsheet/), which is up to date with all the latest changes, and in many cases now links directly to the shape or operator documentation. Not much else has changed on the homepage yet, but future improvements are planned.
18:34:35
@3dlirious:matrix.org3dlirious *
  • Over 40 (I lost count) new primitives, mostly 2D and mostly exact distance fields. Some are in std.curv, but most are in the new lib.shapes2d library. Shapes include stars, a moon, heart, stroke arc, and exact quadratic bezier curves! All are documented with examples.
18:35:39
@3dlirious:matrix.org3dliriousCOMING SOON!: more features are actively in development, here's a sneak peak:18:37:03
@3dlirious:matrix.org3dlirioustext_preview_1.png
Download text_preview_1.png
18:37:33
@3dlirious:matrix.org3dliriousText support18:37:44
@3dlirious:matrix.org3dliriousscreenshot.1718676494.png
Download screenshot.1718676494.png
18:38:47
@3dlirious:matrix.org3dliriousMany new blending kernels and enhancements; here's an associative blend of three shapes, with colour mixing!18:39:10
1 Oct 2024
@3dlirious:matrix.org3dliriousHmm, is there anybody out there?12:42:42
4 Oct 2024
@3dlirious:matrix.org3dliriousscreenshot.1728004611.jpg
Download screenshot.1728004611.jpg
01:20:21
@3dlirious:matrix.org3dliriousWork in progress. Anyone need a parametric pumpkin?01:21:43
@ivanrancic:matrix.orgkrzno
In reply to @3dlirious:matrix.org
Work in progress. Anyone need a parametric pumpkin?
I will take s e v e n
07:25:20
@ivanrancic:matrix.orgkrzno* I will take exactly s e v e n07:26:01
5 Oct 2024
@3dlirious:matrix.org3dliriousscreenshot.1728141585.jpg
Download screenshot.1728141585.jpg
15:24:41
@3dlirious:matrix.org3dliriousIs that a reference to the storybook? Here's another, this one is intersected with a C(D) triply periodic minimal surface (polar form).15:25:30
@3dlirious:matrix.org3dlirious

parametric
dia :: slider [2,20] = 12;
height :: slider [2,20] = 10;
rib_width :: slider [0.1,5] = 4;
centre_height :: slider [0,0.999] = 0.6;
rib_num :: int_slider [10,30] = 16;
in
let

pumpkin {d, height, centre_height, rib_width, rib_num} =
let
R = d/2;
dx = rib_width;
c = dx/2;
dz = height;
b = dz/2;
ctr_h = centre_height*height/2; //mz

    // Find dy based on centre_height
    a = R/(1 + sqrt(b*b - ctr_h*ctr_h)/b);
    dy = 2*a;
    my = R - a;
    
    // Find inner radius of ribs so we can hollow the pumpkin without cutting through
    angle = pi/rib_num;
    tan_a = tan angle;
    a2tan2 = a*a*tan_a*tan_a;
    
    // Solve quadratic equation
    qa = a2tan2 + c*c;
    qb = 2*a2tan2*my;
    qc = a2tan2*my*my - a*a*c*c;
    ny = (-qb + sqrt(qb*qb - 4*qa*qc))/(2*qa);
    ridge_inner_rad = (my + ny)/cos angle;
    
    // Minimum wall thickness of the pumpkin.
    shell_min_thickness = 0.2;
    
    pumpkin_body = ellipsoid [dx, dy, dz]
        >> colour orange //(lib.web_colour.DarkOrange)
        >> move.y (-my) >> repeat_radial rib_num
        ;
    pumpkin_inside = spheroid.exact [2*(ridge_inner_rad - shell_min_thickness),
                                     2*(ctr_h - shell_min_thickness)]
                        >> colour yellow;
    
    // Stem
    stem_out_dia = 2;  //outer diameter
    stem_ridge_dia = stem_out_dia/2;
    stem_h = 4;
    stem_bend_dia = 2*stem_h;
    stem_bend_ang = 50*deg;
    stem = circle stem_ridge_dia >> colour (lib.web_colour.DarkGreen)
        >> move.y ((stem_ridge_dia - stem_out_dia)/2)
        >> repeat_radial 7
        >> reflect.y
        
        >> extrude stem_h
        >> local_taper {scale:[[1, 1], [0.5, 0.5]], range:[-stem_h/2,stem_h/2]}
        >> about X_axis (bend {d:stem_bend_dia, angle:stem_bend_ang})
        >> rotate.x (-stem_bend_ang/2)
        
        >> move.y (stem_bend_dia/2 + stem_out_dia/2)
        >> twist 0.3
        >> move.z ctr_h
        // Fix bbox!
        ;
    whole = difference2.cmix [pumpkin_body, pumpkin_inside] >> into union [stem];
in whole;

face = union [
triangle [1,1] >> move.x 1.5 >> mirror.x >> move.y 1.5,
triangle [1,1],
lib.shapes2d.moon {d:4, dx:1} >> rotate (pi/2) >> move.y (-0.5)
]
>> colour (lib.web_colour.Goldenrod)
>> extrude (dia)
>> rotate.x (pi/2)
>> bend {d:0, angle:55*deg}
;

// Intersection and difference with colour mixing
intersection2 =
let
_intersection3 mix list = reduce[everything, _intersection3b mix] list;
_intersection3b mix [s1,s2] =
make_shape {
dist p : max[s1.dist p, s2.dist p],
colour p : if mix (
let d1 = s1.dist p;
d2 = s2.dist p;
in if (d2 <= 0 || d2 <= d1) s1.colour p else s2.colour p
)
else s1.colour p,
bbox : [max[s1.bbox.[MIN], s2.bbox.[MIN]], min[s1.bbox.[MAX], s2.bbox.[MAX]]],
is_2d : s1.is_2d && s2.is_2d,
is_3d : s1.is_3d && s2.is_3d,
};
in {
call : _intersection3 false,
cmix : _intersection3 true,
};

difference2 =
let
_difference2 [s1,s2] = intersection2 [s1, complement s2];
_difference2_col [s1,s2] = intersection2.cmix [s1, complement s2];
in {
call : _difference2,
cmix : _difference2_col,
};

in

difference2.cmix [
pumpkin {d:dia, height:height, centre_height:centre_height, rib_width:rib_width, rib_num:rib_num},
face,
]

rotate (10deg) >> rotate.x (10deg)
lib.utilities.face_camera
//>> show_axes

16:41:57

Show newer messages


Back to Room ListRoom Version: 6