logo
down
shadow

orientate a 3d plane from 3 given points


orientate a 3d plane from 3 given points

By : Alexey Malinovskyi
Date : November 14 2020, 04:51 PM
will be helpful for those in need To get the direction of the vector to orientate the plane, calculate the cross product of any of the 2 sides of the triangle
so, if your points are a, b, c
code :
side1 = subVectors (a, b);
side2 = subVectors (a, c);
planeNormal = crossVectors (side1, side2); 


Share : facebook icon twitter icon
How can I project an arbitrary plane identified by 4 points onto a 2d plane?

How can I project an arbitrary plane identified by 4 points onto a 2d plane?


By : Eyal Peleg
Date : March 29 2020, 07:55 AM
I wish did fix the issue. This is a special case of finding mappings between quadrilaterals that preserve straight lines. These are generally called homographic or projective transforms. Here, one of the quads is a square, so this is a popular special case. You can google these terms ("quad to quad", etc) to find explanations and code, but here are some for you.
Perspective Transform Estimation
Randomly selecting points in a plane, with a higher probability of selection given to closer points

Randomly selecting points in a plane, with a higher probability of selection given to closer points


By : user3118512
Date : March 29 2020, 07:55 AM
I wish did fix the issue.
Assign a "weight" to each point by for instance computing 1 / distanceFromCurrent.
Convert points from one image plane to another plane using OpenCV

Convert points from one image plane to another plane using OpenCV


By : Phillip Shentu
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , Use a homographic transform, if you provide 4 well spaced points the transform produced by findHomography will be well suited to your needs. Then you can apply the transformation using perspectiveTransform.
Rotate K coplanar points to a plane parallel to x,y plane

Rotate K coplanar points to a plane parallel to x,y plane


By : something
Date : March 29 2020, 07:55 AM
Hope this helps You need basis vectors X,Y,Z first. So let take the mid point A and two distant points to it B,C (not on single line) from your data set first. The X,Y should lie in the plane and Z should be normal to it so:
code :
X = B-A     // any non zero vector inside plane
X = X / |X| // unit in size

Y = C-A     // any non zero vector inside plane
(X.Y) != 0  // but not parallel to X !!!
Y = Y / |Y| // unit in size
Z = X x Y   // cross product gives you perpendicular vector
Y = Z x X   // now all vectors are perpendicular and unit
P(u,v) = A + u*X + v*Y
u = ((P-A).X) = dot(P-A,X)
v = ((P-A).Y) = dot(P-A,Y)
Find 4 points equidistant from a centroid in 3D space where all points lie on a predefined plane

Find 4 points equidistant from a centroid in 3D space where all points lie on a predefined plane


By : vampire.sorceress
Date : March 29 2020, 07:55 AM
should help you out We need to find two vectors perpendicular to plane (the normal). We can do so by the following procedure:
Normalize plane Set a vector k = (1, 0, 0) Calculate math.abs(np.dot(k, plane)) If > 0.9 then set k = (0, 1, 0) Calculate a = np.cross(k, plane)) and b = np.cross(plane, a) You now have two vectors in the plane. You can get any points in the plane by adding some number times these two vectors and adding to centeroid If you want specific distances, you need to normalize a and b
code :
import numpy as np
import math

def normalize(a):
    b = 1.0 / math.sqrt(np.sum(a ** 2))
    return a * b

def circlePoints(r, N_points, plane=(1,1,1), centroid=(0,0,0)):
    p = normalize(np.array(plane))
    k = (1, 0, 0)
    if math.fabs(np.dot(k, p)) > 0.9:
        k = (0, 1, 0)
    a = normalize(np.cross(k, p))
    b = normalize(np.cross(p, a))
    step = (np.pi * 2) / N_points
    ang = [step * i for i in xrange(N_points)]
    return [(np.array(centroid) + \
            r * (math.cos(rot) * a + math.sin(rot) * b)) \
            for rot in ang]

print circlePoints(10, 5, (1, 1, 1), (0, 0, 0))
Related Posts Related Posts :
  • How to debug Vue application with google chrome
  • html 5 web app cache download complete javascript alert?
  • Ember.js setupController fired only once
  • How to validate a currency input
  • How to convert my Array of data to key & value pair
  • Statistics circles in CSS
  • So I wanted to make a trig solver in javascript?
  • Showing HighCharts series name on x-axis and in legend
  • In Rails, how can we pass parameters in script?
  • Build Fails: `npm rebuild node-sass --force`
  • Angular Datepicker change dateformat
  • Trying to extract data from between two sets of characters
  • Configuring Jest in WebStorm
  • Uncaught Error: Syntax error, unrecognized expression: tr.ec_portfolio_title,
  • JQuery fading in fading out continuously
  • Unexpected end of input (Line 1) and Undefined Function?
  • How to animate the width of a div slowly with jquery
  • JavaScript + RegEx Complications- Searching Strings Not Containing SubString
  • SignalR - Unable to get property 'client' of undefined or null reference
  • full calendar not displaying when loaded (with backbone)
  • Angular: Update service and share data between controllers
  • ReplaceAll Google script
  • Search for matching LI items in separate UL
  • Access arguments of an... argument
  • Customizing Google custom search jsapi (query strings)
  • React | Can´t load Images > Module not found
  • Dynamically creating buttons in DOJO
  • 404 Not Found in AJAX post call
  • How do I find out, using javascript, what software opened and running my application?
  • Javascript to check the status of wireless connection
  • StarDict support for JavaScript and a Firefox OS App
  • Phonegap event Resume
  • call javascript function on ENTER key press?
  • When is the best time to remove no-js classes from the html tag
  • Recommended email sending languages
  • setInterval not working properly with chrome
  • Does IE create new scope for each script tag?
  • Uncaught SyntaxError: Unexpected token < Underscore and parse issues
  • How to pass captured URL to Email Body in HTML
  • How to structure default nested resources?
  • Store all the keys of a JSON object in a variable
  • Need an efficient way to group the Array of object in javascript
  • a sensible approach to highcharts x-axis labels
  • IDE autocompletion for javascript AMD loading style
  • Bootstrap menu disappears after first click setting the ul style to none
  • split ajax json response errors in each field
  • how to add javascript in head in cmsms
  • REGEX: Finding the correct occurrence order of some given special characters in a string
  • How do you preserve a JavaScript date's time zone from browser to server, and back?
  • Return binary result from phantomjs webserver
  • must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
  • Replacing a substring of an element's text with another string
  • How do I filter marks greater than or equal to 90 in this array?
  • Modify the text of my radio input button?
  • Clicking on status bar does not scroll to top of app (Trigger.io)
  • Mocha JS: How to highlight specific assertion failure?
  • $.getJSON jquery parsing to HTML
  • Find items of a certain class (a) that are also in other classes (b,c,d)
  • Setting different images for D3 force-directed layout nodes
  • Integrating Dropzone.js with angular
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org