# Random Points on Surface?

**URL:** <https://forum.dynamobim.com/t/random-points-on-surface/25021>\
**Category:** Uncategorized\
**Created:** [August 20, 2018, 3:34pm UTC](https://forum.dynamobim.com/t/random-points-on-surface/25021 "2018-08-20T15:34:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![interactiverendering](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@interactiverendering](https://forum.dynamobim.com/u/interactiverendering)\
**Post date:** [August 20, 2018, 3:34pm UTC](https://forum.dynamobim.com/t/random-points-on-surface/25021/1 "2018-08-20T15:34:41Z")

</div>

![Capture1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/4/e4fe1b0beec9b8b3461930983e0d7512c9967314.png) Hi All Im trying to generate random points on surface but still no luck, here’s what i have at the moment.

Any help Thanks.

 ![RandomP%7Boints](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/e/0e9152667df14efeab4f6b50bd35307b585011db.png)

---

<div class="post-metadata">

**Author:** ![Andrew\_Hannell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andrew_hannell/32/103315_2.png) [@Andrew\_Hannell](https://forum.dynamobim.com/u/Andrew_Hannell)\
**Post date:** [August 21, 2018, 9:39am UTC](https://forum.dynamobim.com/t/random-points-on-surface/25021/2 "2018-08-21T09:39:57Z")

</div>

like this ?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/1/d105b21e035f007cc384c8af0e8a4328e08c1311.png)

Andrew

---

<div class="post-metadata">

**Author:** ![interactiverendering](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@interactiverendering](https://forum.dynamobim.com/u/interactiverendering)\
**Post date:** [August 21, 2018, 9:55am UTC](https://forum.dynamobim.com/t/random-points-on-surface/25021/3 "2018-08-21T09:55:48Z")

</div>

nice can you show the full graph please? Thanks.

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [August 21, 2018, 9:59am UTC](https://forum.dynamobim.com/t/random-points-on-surface/25021/4 "2018-08-21T09:59:42Z")

</div>

The only thing below his graph is the surface that connects to the Geometry.DoesIntersect. That should be everything you need. The Math.RandomList into the U,V parameters are what makes the random points. The Geometry.DoesIntersect makes sure that those points are actually on the surface and is used to filter the points. The ‘in’ output of the List.FilterByBoolMask is what you want, it is the list of all of the random points on the surface.

---

<div class="post-metadata">

**Author:** ![interactiverendering](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@interactiverendering](https://forum.dynamobim.com/u/interactiverendering)\
**Post date:** [August 21, 2018, 10:00am UTC](https://forum.dynamobim.com/t/random-points-on-surface/25021/5 "2018-08-21T10:00:38Z")

</div>

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Andrew\_Hannell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andrew_hannell/32/103315_2.png) [@Andrew\_Hannell](https://forum.dynamobim.com/u/Andrew_Hannell)\
**Post date:** [August 21, 2018, 10:09am UTC](https://forum.dynamobim.com/t/random-points-on-surface/25021/6 "2018-08-21T10:09:52Z")

</div>

@kennyb6 is correct

You just feed in a surface- so the output from your ‘Surface.ByPatch’ node should work

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [August 21, 2018, 12:21pm UTC](https://forum.dynamobim.com/t/random-points-on-surface/25021/7 "2018-08-21T12:21:49Z")

</div>

@interactiverendering the important thing to note here is that the math.random list returns values from 0 to 1, but in your original example you were returning examples from 1 to X, stepping X times (you were using the same value for X and N).

In Dynamo terms, parameters are a percentage along the element type in question. So for a curve:  
The point at parameter 0 is the start point.  
The point at parameter 1 is the end point.  
The point at parameter 0.5 is the midpoint.  
The point at parameter 0.75 is the 3/4 point.  
The point at parameter 0.X is the X/100 point.

This also scales:  
The point at parameter 2 is the length of the curve off the end of the curve.  
The point at parameter 3 is twice the length of the curve off the curve.  
The point at parameter X is X% along the length of the curve.

Surfaces work the same way, but with two parameters for their primary axis aligned to their untrimmed shape. This is why you need the geometry.does intersect node - otherwise your points may fall outside the surface as the surface itself doesn’t extend the full extent of the 0-1 value at any given u or v axis.

Hopefully this will keep things clear for your next time out.
