5 points - mean centre.center

If I have 5 points how can I use autocad to determine the mean centre? tia

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
DonLogan wrote:

hmmm
1. ssget or whatever to get the entities that define the points, but get a list of the points. 2. extract the 10's and or 11's from the dxf code, depending on type of entity 3. sum the x's and sum the y's and divide by 5 ( or "n" if your are writing generic) 4. (cons (+ x1 x2 x3 x4 x5)(+y1 y2 y3 y4 y5))
yes?
or if you need a 3d point (list (+ x1 x2 x3 x4 x5)(+y1 y2 y3 y4 y5((+z1 z2 z3 z4 z5))
seems like it might work.
must play now.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I am an auctocad beginner so I'll try

program code?

step in code

step in code
So this is the mean center! - very nice

what is this?
thanks very much easy for you, eh!

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
This is a multi-part message in MIME format. --------------080901050801020505000909 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit
DonLogan wrote:

no disrespect intended.
beginner? you said "points". is it points like vertexes on a polygon, or is there no particular object that relates them.
two different problems. forgive me. I am in a programming mood, in the zone.
if you have an object then you are probably asking for a centroid, and I think there are COMMANDS for that. depending on your autocad version, there may be something more better than the 2000 I run.
but I was not pulling your chain. a line looks like this to autocad.
Command: (setq it (entget (car (entsel))))
Select object: ((-1 . <Entity name: 1940c28>) (0 . "LINE") (330 . <Entity name: 193a4f8>) (5 . "CB6D") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "WALLS") (100 . "AcDbLine") (10 832.0 697.5 0.0) (11 832.0 580.0 0.0) (210 0.0 0.0 1.0))
the (10 832.0 697.5 0.0) being dxf code for one endpoint and the (11 832.0 580.0 0.0) being the other endpoint. (11 832.0 580.0 0.0) is a 3d point, 11 being the "control" character used to search for the data, 832.0 corresponding to the x component, 580.0 being y, and since I draw without any positive elevation, z = 0.
the (0 . "LINE") means the entity I selected is a line, were it a circle it would say (0 . "CIRCLE").
so, if you know the type of entity, you can extract the numbers associated with the cartesian coordinates, x & y, and do the algebra.
but if you already have a single entity, like a closed polygon or better yet, a region, I think there are commands that will just hand you the centroid point. if not in the basic package, then an add in.
what kind of stuff are you drawing?
--------------080901050801020505000909 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Arial">DonLogan wrote:</font> <blockquote cite=" snipped-for-privacy@4ax.com" type="cite"> <pre wrap=""><!----><font face="Arial"> thanks very much easy for you, eh? </font></pre> </blockquote> no disrespect intended.<br> <br> beginner? <br> you said "points". is it points like vertexes on a polygon, or is there no particular object that relates them.<br> <br> two different problems. forgive me. I am in a programming mood, in the zone.<br> <br> if you have an object then you are probably asking for a centroid, and I think there are COMMANDS for that.<br> depending on your autocad version, there may be something more better than the 2000 I run.<br> <br> but I was not pulling your chain. a line looks like this to autocad.<br> <br> Command: (setq it (entget (car (entsel))))<br> <br> Select object: ((-1 . &lt;Entity name: 1940c28&gt;) (0 . "LINE") (330 . &lt;Entity name: <br> 193a4f8&gt;) (5 . "CB6D") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . <br> "WALLS") (100 . "AcDbLine") (10 832.0 697.5 0.0) (11 832.0 580.0 0.0) (210 0.0 <br> 0.0 1.0))<br> <br> the (10 832.0 697.5 0.0) being dxf code for one endpoint and the (11 832.0 580.0 0.0) being the other endpoint.<br> (11 832.0 580.0 0.0) is a 3d point, 11 being the "control" character used to search for the data, 832.0 corresponding <br> to the x component, 580.0 being y, and since I draw without any positive elevation, z = 0.<br> <br> the (0 . "LINE") means the entity I selected is a line, were it a circle it would say (0 . "CIRCLE").<br> <br> so, if you know the type of entity, you can extract the numbers associated with the cartesian coordinates, x &amp; y,<br> and do the algebra.<br> <br> but if you already have a single entity, like a closed polygon or better yet, a region, I think there are commands <br> that will just hand you the centroid point. if not in the basic package, then an add in.<br> <br> what kind of stuff are you drawing?<br> </body> </html>
--------------080901050801020505000909--
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Beginner - yes. I went to the local college, a few years ago, and took three autocad courses. But I've only had occasion to do a couple of drawings.

I shoot rifle at 100 and 200 yards. Object being to drill 5 shots into one hole. I shoot 5 x 5 shots per target. Now I'm interested in determining the mean centre for each 5 shot group. This will help me adjust the scope, which is 1/8" adjustable at 100yds. I made up the original targets using visio. Now I started drawing the groups on a visio template and got lost! I was trying to determine the centre diagrammatically draw intersecting lines & circles and going crazy. Guess I've forgotten all my algebra. Thought I'd move the problem over to autocad but still didn't know where to start. I knew if I asked this group I'd get the math to solve the problem. So thanks very much
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thanks Bill
The pencil solutions will be helpful for roughing in a new scope at the range.
thanks again

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Makes an ordered (coordinate) pair, though I think he forgot to divide by 5.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
When would you want something like this? Moving mechanical stuff?
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I have no idea why Don wanted this. Have LISP, will code.
-Bill
====== Oh, now I see his reply about target shooting. Unlike a centroid, finding the mean weights the result toward two points close together.
Michael Bulatovich wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.