geometry

Fit maximum convex hull to interior of a set of points

守給你的承諾、 提交于 2021-02-07 09:46:51
问题 I'd like to find the largest convex hull which fits in the interior of a set of points. I have a set of points which are roughly circular, with a large number of outlier points outside of the circle I'd like to fit. Imagine a circle with "solar flares"... I want to fit the circle and completely ignore the flares. I've tried various fit and culling strategies, but they aren't working well. I've searched quite a bit and not found a solution. Thanks in advance. 回答1: The notion you need may be

Fit maximum convex hull to interior of a set of points

浪子不回头ぞ 提交于 2021-02-07 09:45:49
问题 I'd like to find the largest convex hull which fits in the interior of a set of points. I have a set of points which are roughly circular, with a large number of outlier points outside of the circle I'd like to fit. Imagine a circle with "solar flares"... I want to fit the circle and completely ignore the flares. I've tried various fit and culling strategies, but they aren't working well. I've searched quite a bit and not found a solution. Thanks in advance. 回答1: The notion you need may be

Getting an SCNNode's bounding volume with rotation

为君一笑 提交于 2021-02-07 09:00:26
问题 I have a very simple scene set up using the XCode level editor. As you can see, one of the 1x5 rectangular cuboids has been rotated by 90º. This was achieved by setting the y attribute of the Euler Angles property to 90 in the Node Inspector. But notice that the Bounding Box doesn't account for the cuboids rotation. This is also the case when I iterate through the SCNNodes in the scene. Both cuboids have the same Bounding Volumne for wall:SCNNode in walls.childNodes { var v1 = SCNVector3Zero

Getting an SCNNode's bounding volume with rotation

青春壹個敷衍的年華 提交于 2021-02-07 08:58:35
问题 I have a very simple scene set up using the XCode level editor. As you can see, one of the 1x5 rectangular cuboids has been rotated by 90º. This was achieved by setting the y attribute of the Euler Angles property to 90 in the Node Inspector. But notice that the Bounding Box doesn't account for the cuboids rotation. This is also the case when I iterate through the SCNNodes in the scene. Both cuboids have the same Bounding Volumne for wall:SCNNode in walls.childNodes { var v1 = SCNVector3Zero

Getting an SCNNode's bounding volume with rotation

旧城冷巷雨未停 提交于 2021-02-07 08:57:13
问题 I have a very simple scene set up using the XCode level editor. As you can see, one of the 1x5 rectangular cuboids has been rotated by 90º. This was achieved by setting the y attribute of the Euler Angles property to 90 in the Node Inspector. But notice that the Bounding Box doesn't account for the cuboids rotation. This is also the case when I iterate through the SCNNodes in the scene. Both cuboids have the same Bounding Volumne for wall:SCNNode in walls.childNodes { var v1 = SCNVector3Zero

r - Create linestring from two points in same row in dataframe

余生颓废 提交于 2021-02-07 02:50:33
问题 I was wondering if there is a way to create linestring from two points given in the same row in a dataframe in a new geometry column. In other words longitudes and latitudes of the two points are given in a dataframe like the following: df <- data.frame(id = c("a", "b"), lon1 = c(1,2), lat1 = c(3,4), lon2 = c(5,6), lat2 = c(7,8)) where lon1 and lat1 represent the coordinates of the first point and lon2 and lat2 are the coordinates of the second point. The desired dataframe would have two rows

selectableItemBackgroundBorderless for textview

ⅰ亾dé卋堺 提交于 2021-02-06 20:29:25
问题 I have a TextView which is use as a button. I want to add attribute selectableItemBackgroundBorderless to have circle ripple effect when pressing. The layout is as following: android:id="@+id/create_button" android:layout_width="wrap_content" android:layout_height="54dp" ... android:background="? android:attr/selectableItemBackgroundBorderless" As a result, indeed the circle ripple effect when pressing, but the ripple goes out of the textview, but just out of the bottom of textview (because

2D geometry: how to check if a point is inside an angle

时光毁灭记忆、已成空白 提交于 2021-02-06 10:53:47
问题 i have the following geometrical issue in 2D: i have a point from which i cast an infinite angle (2D-cone) which is given by a direction and an angle. (the point and the direction form a vector and to each side half of the angle forms the 2D-cone) now i want to check if another point in 2D is inside this cone or outside. how can this be achieved? thanks! 回答1: Calculate the vector from the center of the cone to the query point. Normalize the vector to be of length 1, Take the center vector of

Minimal surface solution in Python

懵懂的女人 提交于 2021-02-06 06:55:07
问题 I have a set of 3D points defining a 3D contour. What I want to do is to obtain the minimal surface representation corresponding to this contour (see Minimal Surfaces in Wikipedia). Basically this requires to solve a nonlinear partial differential equation. In Matlab this is almost straightforward using the pdenonlin function (see Matlab's documentation). An example of its usage for solving a minimal surface problem can be found here: Minimal Surface Problem on the Unit Disk. I need to make

Minimal surface solution in Python

梦想的初衷 提交于 2021-02-06 06:55:05
问题 I have a set of 3D points defining a 3D contour. What I want to do is to obtain the minimal surface representation corresponding to this contour (see Minimal Surfaces in Wikipedia). Basically this requires to solve a nonlinear partial differential equation. In Matlab this is almost straightforward using the pdenonlin function (see Matlab's documentation). An example of its usage for solving a minimal surface problem can be found here: Minimal Surface Problem on the Unit Disk. I need to make