Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Formula to calculate cloner radius

    General Talk
    c++ sdk
    2
    3
    651
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mfersaouiM
      mfersaoui
      last edited by mfersaoui

      Hi,
      I'm searching the formula to automatically calculate the Cloner object radius depending on the number of clones (Count) and the Plain object width to obtain a perfect circle of objects without any objects spacing or overlap. see screenshot below:
      calculate_radial_cloner_radius.jpg
      Thanks.

      1 Reply Last reply Reply Quote 0
      • r_giganteR
        r_gigante
        last edited by r_gigante

        Hi mfersaoui, thanks for reaching out us.

        With regard to your question given the length of the side l and the number of sides n you can calculate the apothem of a regular polygon using the following formula:

        apothem = l / (2 * tan ( 180 / n ) )

        Be aware that being the objects distributed with regard to their origin, the half of the height of the polygon should also be considered.

        Be aware that you're intested in the apothem value and not in the real radius cause the Cloner actually use this value.

        Cheers, Riccardo

        mfersaouiM 1 Reply Last reply Reply Quote 1
        • mfersaouiM
          mfersaoui @r_gigante
          last edited by

          @r_gigante

          Hi Riccardo, thank you for your detailed response. That allowed me to find the exact formula.

          l / (2 * tan((180 / n) * 3.14159 / 180))
          

          Regards, Mustapha

          1 Reply Last reply Reply Quote 0
          • First post
            Last post