<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I don't know how to draw leaves.  I would look up how to draw a
      maple leaf or fern with fractals (Michael Barnsley comes to mind).
      It might be easier to start off with a bunch of images/pictures.
      The way they do movies these days is project the background onto a
      wall, then the actors act in front of it. Why fake nature when you
      can sample the real thing?<br>
    </p>
    <p>I used surfaces for 3D "roses" in college a bit, with Newton's
      method. I haven't done it recently, because I proved to myself
      that internal intersections weren't found.<br>
    </p>
    <p>Mostly I use quadrilaterals or triangles to draw things.  I did
      Maurer Roses in 1981-1982 on Apple II+ before "Maurer" existed.
      You can find formulas in old or new CRC Math books, perhaps. I
      used the 25th version or older.  The book has been updated, and I
      can't find the same thing in the online version.<br>
    </p>
    <p>This might be an unorganized introduction (warning, some Perl
      required):</p>
    <p><a class="moz-txt-link-freetext" href="https://coderextreme.net/orbit/">https://coderextreme.net/orbit/</a></p>
    <p>But they aren't "roses" per se.   For more unrealistic things
      (animation), look at:</p>
    <p><a class="moz-txt-link-freetext" href="https://coderextreme.net/flower/">https://coderextreme.net/flower/</a></p>
    <p>I would search through SIGGRAPH conference proceedings in hope of
      getting something realistic.</p>
    <p>I am not your "curve" person. For 3D you're looking for someone
      who knows bicubics or NURBS, but really they pretty much get split
      up into triangles by the graphics card or CPU, so knowing about
      triangle sets and triangle fans are probably useful.  What I do is
      take a tessellated sphere from Blender or a grid IFS from X3D and
      offset the position to make the "rose" surface, and ensure you've
      got enough resolution so the result doesn't look crappy. Also,
      some work was done on the mailing list with FX3D/FVRML way back in
      the distant past.  That would help fit your formulas into an X3D
      mindset.   At this point, if you want to animate the surface, I
      think your best bet is to go with something like GLSL.<br>
    </p>
    <p>I don't know about volumes at all, just surfaces.  I've only
      rendered up to 7 animated "roses" at a time--it's easy to add
      more, but I get concerned about heat, etc.<br>
    </p>
    <p>Here's a sample of something you might get if you use PHP to draw
      things:</p>
    <p><a class="moz-txt-link-freetext" href="https://code.tutsplus.com/tutorials/rendering-text-and-basic-shapes-using-gd--cms-31767">https://code.tutsplus.com/tutorials/rendering-text-and-basic-shapes-using-gd--cms-31767</a></p>
    <p>If you really want better 2D flowers, I highly recommend
      contacting @sxywu on Twitter.  She may be working on 3D as well.</p>
    <p>"Curves" indicates you're using 2D?  There's Processing.JS for
      JavaScript.</p>
    <p>So start small, with 2D vector/SVG drawing (see @sxywu), use
      polar coordinates in an equation like</p>
    <p>r = 100+100*cos(2*phi)<br>
    </p>
    <p>You have to figure out how to convert to Cartesian coordinates,
      but that's easy to find.   Break the curve into a series of lines
      by stepping through values of phi in a loop.  Make the delta phi
      small enough.<br>
    </p>
    <p>I hope you know what a loop is.</p>
    <p>I'm pretty much at the point where I want to draw fractal
      "roses."<br>
    </p>
    <p>John Carlson<br>
    </p>
    <div class="moz-cite-prefix">On 7/3/21 7:44 PM, Konstantin Smirnov
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAD1qDjR36ioDUAJQWpjqQ3fOt=Ghruv4yfpGf-AuA_3xN69wPw@mail.gmail.com">
      <div dir="auto">Yes! I am looking for simple code that can use
        curves of roses to draw them</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">вс, 4 июл. 2021 г., 03:40 John
          Carlson <<a href="mailto:yottzumm@gmail.com"
            moz-do-not-send="true">yottzumm@gmail.com</a>>:<br>
        </div>
        <blockquote class="gmail_quote">
          <div dir="auto">Not using my imagination here much…would
            something like this do the trick?</div>
          <div dir="auto"><br>
          </div>
          <div dir="auto">
            <div><a
                href="https://www.php.net/manual/en/function.imageline.php"
                target="_blank" rel="noreferrer" moz-do-not-send="true">https://www.php.net/manual/en/function.imageline.php</a></div>
            <br>
          </div>
          <div><br>
            <div class="gmail_quote">
              <div dir="ltr" class="gmail_attr">On Sat, Jul 3, 2021 at
                7:37 PM Konstantin Smirnov <<a
                  href="mailto:konstantin.e.smirnov@gmail.com"
                  target="_blank" rel="noreferrer"
                  moz-do-not-send="true">konstantin.e.smirnov@gmail.com</a>>
                wrote:<br>
              </div>
              <blockquote class="gmail_quote">
                <div dir="auto">Thanks! I saw your links
                  <div dir="auto">Fibonacci on other sites really exist.
                    Formulas for roses not clear how to apply, </div>
                  <div dir="auto">I am looking for those that can be
                    plugged in simple languages such as php or
                    JavaScript, </div>
                  <div dir="auto"><br>
                  </div>
                  <div dir="auto">More important is to have formulas.
                    For example for drawing leaves. At first for php,
                    then for 3d</div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">вс, 4 июл. 2021 г.,
                    03:15 John Carlson <<a
                      href="mailto:yottzumm@gmail.com" target="_blank"
                      rel="noreferrer" moz-do-not-send="true">yottzumm@gmail.com</a>>:<br>
                  </div>
                </div>
                <div class="gmail_quote">
                  <blockquote class="gmail_quote">
                    <div dir="auto">Ah, GD, I’ve used that in Perl, not
                      PHP.   I was never really impressed by GD, but it
                      may work for 2D.   I can help with JavaScript,
                      GLSL or maybe Perl (OBJ file) if you want 3D.  I
                      don’t have my AppleSoft Basic around any more.</div>
                    <div dir="auto"><br>
                    </div>
                    <div dir="auto">Maybe you want something like
                      vpython?</div>
                    <div dir="auto"><br>
                    </div>
                    <div dir="auto">You seem to be lazy and not even
                      using resources given to you?   What kind of
                      flower do you want to draw?</div>
                    <div dir="auto"><br>
                    </div>
                    <div dir="auto">Look up converting converting polar
                      or spherical coordinates to Cartesian coordinates
                      would be a good start.  Also look up L-systems and
                      graftals.</div>
                    <div dir="auto"><br>
                    </div>
                    <div dir="auto">John </div>
                    <div><br>
                      <div class="gmail_quote">
                        <div dir="ltr" class="gmail_attr">On Sat, Jul 3,
                          2021 at 6:53 PM John Carlson <<a
                            href="mailto:yottzumm@gmail.com"
                            rel="noreferrer noreferrer" target="_blank"
                            moz-do-not-send="true">yottzumm@gmail.com</a>>
                          wrote:<br>
                        </div>
                        <blockquote class="gmail_quote">
                          <div dir="auto">I would start out with
                            something like Processing, not php.</div>
                          <div dir="auto"><br>
                          </div>
                          <div dir="auto">Good luck!</div>
                          <div><br>
                            <div class="gmail_quote">
                              <div dir="ltr" class="gmail_attr">On Sat,
                                Jul 3, 2021 at 6:51 PM John Carlson <<a
                                  href="mailto:yottzumm@gmail.com"
                                  rel="noreferrer noreferrer"
                                  target="_blank" moz-do-not-send="true">yottzumm@gmail.com</a>>
                                wrote:<br>
                              </div>
                              <blockquote class="gmail_quote">
                                <div dir="auto">I’ve never heard of php
                                  doing drawings.  You mean SVG or X3D?</div>
                                <div dir="auto"><br>
                                </div>
                                <div dir="auto">
                                  <div><a
                                      href="https://en.m.wikipedia.org/wiki/Rose_(mathematics)"
                                      rel="noreferrer noreferrer"
                                      target="_blank"
                                      moz-do-not-send="true">https://en.m.wikipedia.org/wiki/Rose_(mathematics)</a></div>
                                  <div dir="auto"><br>
                                  </div>
                                  <div dir="auto">I don’t know about
                                    real flowers.   Good luck with that.</div>
                                  <div dir="auto"><br>
                                  </div>
                                  <div dir="auto">Number theory is
                                    really an odd choice, but I guess I
                                    suggested Fibonacci.  That was more
                                    for numbers of petals.</div>
                                </div>
                                <div dir="auto"><br>
                                </div>
                                <div dir="auto">John</div>
                                <div><br>
                                  <div class="gmail_quote">
                                    <div dir="ltr" class="gmail_attr">On
                                      Sat, Jul 3, 2021 at 6:41 PM
                                      Konstantin Smirnov <<a
                                        href="mailto:konstantin.e.smirnov@gmail.com"
                                        rel="noreferrer noreferrer"
                                        target="_blank"
                                        moz-do-not-send="true">konstantin.e.smirnov@gmail.com</a>>
                                      wrote:<br>
                                    </div>
                                    <blockquote class="gmail_quote">
                                      <div dir="auto">Thanks! I mean
                                        simple algorithm or formulas,
                                        for example on php, that can
                                        easily draw flowers with math,
                                        number theory. For example, some
                                        flowers may have structure like
                                        math equations solutions. 
                                        <div dir="auto"><br>
                                        </div>
                                        <div dir="auto">Or for
                                          beginning, simply drawing a
                                          flower on php code. </div>
                                      </div>
                                      <br>
                                      <div class="gmail_quote">
                                        <div dir="ltr"
                                          class="gmail_attr">вс, 4 июл.
                                          2021 г., 01:19 John Carlson
                                          <<a
                                            href="mailto:yottzumm@gmail.com"
                                            rel="noreferrer noreferrer"
                                            target="_blank"
                                            moz-do-not-send="true">yottzumm@gmail.com</a>>:<br>
                                        </div>
                                      </div>
                                      <div class="gmail_quote">
                                        <blockquote class="gmail_quote">
                                          <div dir="auto">Mathematical
                                            Roses or Rhodonea should
                                            jump start you.   Also look
                                            up @sxywu on Twitter.   Her
                                            data sketches book may have
                                            specifics for a variety of
                                            “flowers”. For a more techy
                                            look, find Maurer Roses.</div>
                                          <div dir="auto"><br>
                                          </div>
                                          <div dir="auto">I don’t know
                                            what you mean by Nt.   You
                                            can find shaders or
                                            JavaScript code in
                                            X3DJSONLD.   File names with
                                            “flower” or contents of
                                            “rose” will likely give you
                                            a jump start in 3D, but they
                                            are quite artificial and
                                            even more so animated.  Plus
                                            it seems like my code is
                                            currently in a non-working
                                            state.</div>
                                          <div dir="auto"><br>
                                          </div>
                                          <div dir="auto">I would try
                                            something with Fibonacci,
                                            golden ratio to get things
                                            more natural, or perhaps
                                            particle systems for
                                            imperfections.</div>
                                          <div dir="auto"><br>
                                          </div>
                                          <div dir="auto">For previews,
                                            checkout <a
                                              href="https://codextreme.net"
                                              rel="noreferrer noreferrer
                                              noreferrer"
                                              target="_blank"
                                              moz-do-not-send="true">https://codextreme.net</a>.
                                            One can get quite a lot of
                                            diversity with parametric
                                            equations, especially when
                                            animating parameters.</div>
                                          <div dir="auto"><br>
                                          </div>
                                          <div dir="auto">
                                            <div><a
                                                href="http://www.grad.hr/sgorjanc/Links/roses.pdf"
                                                rel="noreferrer
                                                noreferrer noreferrer"
                                                target="_blank"
                                                moz-do-not-send="true">http://www.grad.hr/sgorjanc/Links/roses.pdf</a></div>
                                            <br>
                                          </div>
                                          <div dir="auto"><br>
                                          </div>
                                          <div dir="auto">Good luck!</div>
                                          <div dir="auto">
                                            <div class="gmail_quote">
                                              <div dir="ltr"
                                                class="gmail_attr">On
                                                Sat, Jul 3, 2021 at
                                                11:45 AM Konstantin
                                                Smirnov <<a
                                                  href="mailto:konstantin.e.smirnov@gmail.com"
                                                  rel="noreferrer
                                                  noreferrer noreferrer"
                                                  target="_blank"
                                                  moz-do-not-send="true">konstantin.e.smirnov@gmail.com</a>>
                                                wrote:<br>
                                              </div>
                                              <blockquote
                                                class="gmail_quote">
                                                <div dir="auto">Hi
                                                  <div dir="auto">Who
                                                    knows formulas that
                                                    can be used for
                                                    drawing of flowers?
                                                    Nt or algorithms</div>
                                                </div>
_______________________________________________<br>
                                                x3d-public mailing list<br>
                                                <a
                                                  href="mailto:x3d-public@web3d.org"
                                                  rel="noreferrer
                                                  noreferrer noreferrer"
                                                  target="_blank"
                                                  moz-do-not-send="true">x3d-public@web3d.org</a><br>
                                                <a
                                                  href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org"
                                                  rel="noreferrer
                                                  noreferrer noreferrer
                                                  noreferrer"
                                                  target="_blank"
                                                  moz-do-not-send="true">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
                                              </blockquote>
                                            </div>
                                          </div>
                                        </blockquote>
                                      </div>
                                    </blockquote>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                    </div>
                  </blockquote>
                </div>
              </blockquote>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>