sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Component Spray update

    Scheduled Pinned Locked Moved Plugins
    29 Posts 16 Posters 50.4k Views 16 Watching
    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.
    • AdamBA Offline
      AdamB
      last edited by

      @jackson said:

      So what factor affects the otherwise random positioning? It would seem to me the only factors which could cause this obviously non-random influence on random scattering must be either
      a) proximity to the centre point
      b) proximity from the boundary

      Its a bit involved but since you ask...

      If you use a random number generator that is normally distributed and use it in an orthogonal linear space you're all set. So compo_spray along a Line works great with no bunching. But for the Spray mode, the script calculates a random radius and a random angle around the center. However, the circumference of a circle close to the center is smaller than at the outside edge of the spray so using a normally distributed random number for the radius effectively biases position generation to the center point of the spray.

      Adding "clash-detection" means you can set a "N per unit area" threshold so although it tries to add more near the center of the spray, they get rejected hence you don't get that bunching.

      Phew....Fascinating, huh? πŸ˜‰

      Developer of LightUp Click for website

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jackson
        last edited by

        Adam,

        Thanks for that detailed, but very clear explanation, it hadn't occurred to me that the random scattering was calculated along the circumferences of concentric circles. That actually is fascinating!

        Sounds like your tweak is a useful addition. πŸ‘

        Jackson

        1 Reply Last reply Reply Quote 0
        • plot-parisP Offline
          plot-paris
          last edited by

          fascinating indeed. now everything makes sense. πŸ˜’

          1 Reply Last reply Reply Quote 0
          • Bob JamesB Offline
            Bob James
            last edited by

            @jackson said:

            It'd be great to be able to scatter trees randomly, but at an average of say 1 instance per 10mΒ². [/quote]

            I'm looking for a way to randomly place people in a room: Jackson's suggestion would really do that job.

            Didier: Looking forward to your having enough time to re-address this Ruby.

            i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

            1 Reply Last reply Reply Quote 0
            • T Offline
              troyhome
              last edited by

              I really appreciate the generosity with which you supply this community so many innovative tools. the dialogue that comes with your scripts is essential to improving SketchUp and how people interact with it.
              Thank you.

              IOviz.com
              SU Pro 2024 PC

              1 Reply Last reply Reply Quote 0
              • S Offline
                Sir
                last edited by

                this looks like an amazingly useful plugin. thanks!

                1 Reply Last reply Reply Quote 0
                • dereiD Offline
                  derei
                  last edited by

                  What means this update? If I want the latest version of the Component Spray, is it This One, or This one?
                  Thank you.

                  DESIGNER AND ARTIST [DEREI.UK](http://derei.uk/l)

                  1 Reply Last reply Reply Quote 0
                  • Didier BurD Offline
                    Didier Bur
                    last edited by

                    Latest version is here: http://rhin.crai.archi.fr/RubyLibraryDepot/plugin_details.php?id=76

                    DB

                    1 Reply Last reply Reply Quote 0
                    • dereiD Offline
                      derei
                      last edited by

                      @didier bur said:

                      Latest version is here: http://rhin.crai.archi.fr/RubyLibraryDepot/plugin_details.php?id=76

                      thank you very much ! β˜€

                      DESIGNER AND ARTIST [DEREI.UK](http://derei.uk/l)

                      1 Reply Last reply Reply Quote 0
                      • brookefoxB Offline
                        brookefox
                        last edited by

                        Dear Farmer,

                        Finally I have an occasion, and finally I straighten my install and finally I harvest a moment of your efforts.

                        Thank you, Farmer. You help make living in this valley a pleasure.

                        http://img638.imageshack.us/img638/7831/compospray1.jpg

                        ~ Brooke

                        1 Reply Last reply Reply Quote 0
                        • brookefoxB Offline
                          brookefox
                          last edited by

                          EDIT: This error may just be mine: perhaps having enabled 'hide everything else while editing group'.

                          There may be a limit on how far the routine likes to be 'buried'? That is, when I run it on a simple group, no sweat, but when I try to run it in group within a component, it seems to fail. Please see image. Top success within the group copied out of the component. Lower failure on the same group residing in the component. Perhaps I missed some advice in the use instructions. (Not an issue of overshadowing entities.)

                          I tried the same test in the naked group in the same location as the failing component and it worked fine, so it does appear to be that the routine wants to breathe a bit.


                          component array-fail-1.JPG

                          ~ Brooke

                          1 Reply Last reply Reply Quote 0
                          • brookefoxB Offline
                            brookefox
                            last edited by

                            When spraying grass components onto a large area and I want to keep the numbers down the lowest available setting of 1% is still very much too high, so I make a request for percentages below 1.

                            My work-round for this is to include within the component a large triangle so the spray density is thus limited and then edit this out of the component later. This works fine.

                            ~ Brooke

                            1 Reply Last reply Reply Quote 0
                            • brookefoxB Offline
                              brookefox
                              last edited by

                              Having a hard time now. Rarely is anything being sprayed, no matter the setting. No groups or components on the receiving end.

                              FloatDomainError?


                              component spray fail-1.JPG

                              ~ Brooke

                              1 Reply Last reply Reply Quote 0
                              • 1
                              • 2
                              • 2 / 2
                              • First post
                                Last post
                              Buy SketchPlus
                              Buy SUbD
                              Buy WrapR
                              Buy eBook
                              Buy Modelur
                              Buy Vertex Tools
                              Buy SketchCuisine
                              Buy FormFonts

                              Advertisement