GraphicsComplex의 타원체

Sep 23 2020

나는 Ellipsoida 에서 사용하려고하는데 GraphicsComplex막혔습니다. 내 이해 GraphicsComplex는 명시적인 점 좌표 할당이 대신 좌표 목록을 가리키는 정수 값으로 대체된다는 것입니다.

그래서 대신

 Graphics3D[Sphere[{0, 0, 0}, 1]]

나는 사용할 수있다

 Graphics3D[GraphicsComplex[{{0, 0, 0}}, Sphere[1, 1]]]

대신. 의 첫 번째 인수 Sphere는 목록의 첫 번째 점으로 대체됩니다. 즉, {0,0,0} 두 번째 인수는 반경 (좌표 아님)으로 올바르게 식별되고 {0,0,0}로 대체되지 않습니다.

Ellipsoid대신 사용하면 대신

Graphics3D[Ellipsoid[{0, 0, 0}, {2, 3, 4}]]

나는 사용한다

Graphics3D[GraphicsComplex[{{0, 0, 0}}, Ellipsoid[1, {2, 3, 4}]]]

오류가 발생합니다.

Affine transform 1 should be one of the forms {{{xx, yx, zx}, {xy, yy, zy}, {xz, yz, zz}}, {tx, ty, tz}}; {{xx, yx, zx}, {xy, yy, zy}, {xz, yz, zz}}; or {tx, ty, tz}.

과

Coordinate index 0 is out of range for the enclosing GraphicsComplex.

두 가지 질문 : 내가 GraphicsComplex잘못 사용 합니까? 에 Ellipsoids를 공급하는 간단한 해결 방법 이 GraphicsComplex있습니까?

답변

2 CarlWoll Sep 22 2020 at 23:59

참고 Ellipsoid사용하여 렌더링 GeometricTransformation후드 :

ToBoxes @ Graphics3D[Ellipsoid[{1,1,1}, {2,3,4}]]

Graphics3DBox [InterpretationBox [GeometricTransformation3DBox [SphereBox [{0, 0, 0}], {{{2, 0, 0}, {0, 3, 0}, {0, 0, 4}}, {1, 1, 1 }}], 타원 [{1, 1, 1}, {2, 3, 4}]]]

기본적으로 원점에있는 구는에 의해 변환되고 변형되어 GeometricTransformation3DBox원하는 Ellipsoid. 이제의 중심은 Ellipsoid변형 인수의 일부입니다. 불행히도 GraphicsComplex좌표 인덱스는 일반 그래픽 프리미티브 내부에있을 때만 처리 할 수 ​​있습니다 SphereBox. 이것이 작동하지 않는 이유 GraphicsComplex입니다 Ellipsoid. 해당 GraphicsComplex버전을 고려하십시오 .

ToBoxes @ Graphics3D[GraphicsComplex[{{1,1,1}}, Ellipsoid[1, {2, 3, 4}]]]

Graphics3DBox [GraphicsComplex3DBox [{{1, 1, 1}}, InterpretationBox [GeometricTransformation3DBox [SphereBox [{0, 0, 0}], {{{2, 0, 0}, {0, 3, 0}, {0, 0, 4}}, 1}], 타원체 [1, {2, 3, 4}]]]]

내부 가 포인트 를 나타내는 GraphicsComplex3DBox것을 이해할 수 있다면 제대로 렌더링 될 것입니다. 그러나 그러한 목록의 어떤 부분이 포인트에 해당하는지 파악하는 것은 까다로워서 포기합니다.1GeometricTransformation3DBox{1, 1, 1}GraphicsComplex3DBox