This adds mathematical lines to a scene. Their intersection with the current bounding box will be drawn.

abclines3d(x, y = NULL, z = NULL, a, b = NULL, c = NULL, ...)

Arguments

x, y, z

Coordinates of points through which each line passes.

a, b, c

Coordinates of the direction vectors for the lines.

...

Material properties.

Details

Draws the segment of a line that intersects the current bounding box of the scene using the parametrization $$(x, y, z) + (a, b, c) * s$$ where $$s$$ is a real number.

Any reasonable way of defining the coordinates x, y, z and a, b, c is acceptable. See the function xyz.coords for details.

Value

A shape ID of the object is returned invisibly.

planes3d, rgl.planes for mathematical planes.
segments3d draws sections of lines that do not adapt to the bounding box.
plot3d(rnorm(100), rnorm(100), rnorm(100))
{"x":{"material":{"color":"#000000","alpha":1,"lit":true,"ambient":"#000000","specular":"#FFFFFF","emission":"#000000","shininess":50,"smooth":true,"front":"filled","back":"filled","size":3,"lwd":1,"fog":true,"point_antialias":false,"line_antialias":false,"texture":null,"textype":"rgb","texmipmap":false,"texminfilter":"linear","texmagfilter":"linear","texenvmap":false,"depth_mask":true,"depth_test":"less","isTransparent":false,"polygon_offset":[0,0],"margin":"","floating":false,"tag":""},"rootSubscene":1,"objects":{"14":{"id":14,"type":"points","material":{"lit":false},"vertices":"0","colors":"1","centers":"2","ignoreExtent":false,"flags":34816},"16":{"id":16,"type":"text","material":{"lit":false,"margin":0,"floating":true,"edge":[0,1,1]},"vertices":"3","colors":"4","texts":[["rnorm(100)"]],"cex":[[1]],"adj":[[0.5,0.5,0.5]],"centers":"5","family":[["sans"]],"font":[[1]],"ignoreExtent":true,"flags":33808},"17":{"id":17,"type":"text","material":{"lit":false,"margin":1,"floating":true,"edge":[1,1,1]},"vertices":"6","colors":"7","texts":[["rnorm(100)"]],"cex":[[1]],"adj":[[0.5,0.5,0.5]],"centers":"8","family":[["sans"]],"font":[[1]],"ignoreExtent":true,"flags":33808},"18":{"id":18,"type":"text","material":{"lit":false,"margin":2,"floating":true,"edge":[1,1,1]},"vertices":"9","colors":"10","texts":[["rnorm(100)"]],"cex":[[1]],"adj":[[0.5,0.5,0.5]],"centers":"11","family":[["sans"]],"font":[[1]],"ignoreExtent":true,"flags":33808},"19":{"id":19,"type":"abclines","material":{"lit":false},"vertices":"12","colors":"13","centers":"14","ignoreExtent":true,"flags":32832},"5":{"id":5,"type":"light","vertices":[[0,0,1]],"colors":[[1,1,1,1],[1,1,1,1],[1,1,1,1]],"viewpoint":true,"finite":false},"6":{"id":6,"type":"background","material":{"lit":false,"back":"lines"},"colors":"15","centers":"16","sphere":false,"fogtype":"none","fogscale":1,"flags":32768},"15":{"id":15,"type":"bboxdeco","material":{"front":"lines","back":"lines"},"vertices":"17","colors":"18","axes":{"mode":["pretty","pretty","pretty"],"step":[1,1,1],"nticks":[5,5,5],"marklen":[15,15,15],"expand":[1.02999997138977,1.02999997138977,1.02999997138977]},"draw_front":true,"flags":32769},"1":{"id":1,"type":"subscene","par3d":{"antialias":8,"FOV":30,"ignoreExtent":false,"listeners":1,"mouseMode":{"none":"none","left":"trackball","right":"zoom","middle":"fov","wheel":"pull"},"observer":[0,0,22.0516090393066],"modelMatrix":[[0.967286288738251,0,0,-0.397909373044968],[0,0.360215783119202,0.926045715808868,0.298233538866043],[0,-0.989684700965881,0.337053090333939,-21.8596153259277],[0,0,0,1]],"projMatrix":[[3.73205065727234,0,0,0],[0,3.73205065727234,0,0],[0,0,-3.86370325088501,-79.4934997558594],[0,0,-1,0]],"skipRedraw":false,"userMatrix":[[1,0,0,0],[0,0.342020143325668,0.939692620785909,0],[0,-0.939692620785909,0.342020143325668,0],[0,0,0,1]],"userProjection":[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],"scale":[0.967286288738251,1.05320048332214,0.985477268695831],"viewport":{"x":0,"y":0,"width":1,"height":1},"zoom":1,"bbox":[-2.27805256843567,3.10078597068787,-2.39557886123657,2.54448437690735,-2.9907865524292,2.28876376152039],"windowRect":[0,0,256,256],"family":"sans","font":1,"cex":1,"useFreeType":true,"fontname":"NULL","maxClipPlanes":2147483647,"glVersion":"NA","activeSubscene":0},"embeddings":{"viewport":"replace","projection":"replace","model":"replace","mouse":"replace"},"objects":[6,15,14,16,17,18,19,5],"subscenes":[],"flags":36177}},"crosstalk":{"key":[],"group":[],"id":[],"options":[]},"width":480,"height":480,"context":{"shiny":false,"rmarkdown":null},"buffer":{"accessors":[{"bufferView":0,"componentType":5126,"count":100,"type":"VEC3"},{"bufferView":1,"componentType":5121,"count":1,"type":"VEC4"},{"bufferView":2,"componentType":5126,"count":100,"type":"VEC3"},{"bufferView":3,"componentType":5126,"count":1,"type":"VEC3"},{"bufferView":4,"componentType":5121,"count":1,"type":"VEC4"},{"bufferView":5,"componentType":5126,"count":1,"type":"VEC3"},{"bufferView":6,"componentType":5126,"count":1,"type":"VEC3"},{"bufferView":7,"componentType":5121,"count":1,"type":"VEC4"},{"bufferView":8,"componentType":5126,"count":1,"type":"VEC3"},{"bufferView":9,"componentType":5126,"count":1,"type":"VEC3"},{"bufferView":10,"componentType":5121,"count":1,"type":"VEC4"},{"bufferView":11,"componentType":5126,"count":1,"type":"VEC3"},{"bufferView":12,"componentType":5126,"count":6,"type":"VEC3"},{"bufferView":13,"componentType":5126,"count":1,"type":"VEC4"},{"bufferView":14,"componentType":5126,"count":3,"type":"VEC3"},{"bufferView":15,"componentType":5121,"count":1,"type":"VEC4"},{"bufferView":16,"componentType":5121,"count":1,"type":"VEC3"},{"bufferView":17,"componentType":5126,"count":16,"type":"VEC3"},{"bufferView":18,"componentType":5121,"count":1,"type":"VEC4"}],"bufferViews":[{"buffer":0,"byteLength":1200,"byteOffset":0},{"buffer":0,"byteLength":4,"byteOffset":1200},{"buffer":0,"byteLength":1200,"byteOffset":1204},{"buffer":0,"byteLength":12,"byteOffset":2404},{"buffer":0,"byteLength":4,"byteOffset":2416},{"buffer":0,"byteLength":12,"byteOffset":2420},{"buffer":0,"byteLength":12,"byteOffset":2432},{"buffer":0,"byteLength":4,"byteOffset":2444},{"buffer":0,"byteLength":12,"byteOffset":2448},{"buffer":0,"byteLength":12,"byteOffset":2460},{"buffer":0,"byteLength":4,"byteOffset":2472},{"buffer":0,"byteLength":12,"byteOffset":2476},{"buffer":0,"byteLength":72,"byteOffset":2488},{"buffer":0,"byteLength":16,"byteOffset":2560},{"buffer":0,"byteLength":36,"byteOffset":2576},{"buffer":0,"byteLength":4,"byteOffset":2612},{"buffer":0,"byteLength":3,"byteOffset":2616},{"buffer":0,"byteLength":192,"byteOffset":2620},{"buffer":0,"byteLength":4,"byteOffset":2812}],"buffers":[{"byteLength":2816,"bytes":"JqyRv2reMj/KqeW+utZ1v29drr8mgQE/DTWsPyuACL+bA7++azNUvTC18T5pmKm/8oyNP0ks\nhL/2M0e+QktHPxzjib9ohDo/mtwwv2cCj759irw+lRoDPlb7rT6o79e97f8PP8ssGb/6N5C+\nD3nZPuRMxb6/Mw7AwWpNv4Jhpb7iM2u+IiSxvypRGcAJ7mu/ayGbPQdNNj954vo/b5xlv7zY\nIb8m2LC95FDdPZp+6T7UYuq+gbIdv5SFpL+t3yK/dH43v7W35r/VPijA2dfovsyC2r8lWE6/\nCNiLP1I9ET9Uh3Y9/1knv3OxJz/RG3S/vtE1PtPjwb7IKa0+VdRJvwinqb/IBum+HeQyv857\nbr4ITIw/5uSgv6lYwr+Q1re+h2T0v3kXsj4bxYS/C5O9vp3vlT9WaYs+kC8Ju+wxlT+6N4y/\nJvGVvUYjlL9fL/C72vEHQH9pYT1RS1q/HW9vPuWQmD1dZaG/ww8Pv62Goj9KADW/iSOlv2Uq\niL3SHgq/mLENPy1Y1z+m4M0/+lyVvE1hpz8KTRc/mfOSPzikur0keoa/+4/rv7KzcT/LRYq/\n8LEAwD6fvb+Pizc/V7wmv8Cwe784oDG/xkMkv5qvLj6/uaw9GQRUP5iGzr4gsZg/VrHOv5mp\nBzqrSbm/zvP4PuT7Jz+CALO/c+SpPzhgU74iJBU+SiUWP4GdDT8RYag/7kQ3PJm3aD+CIqM+\nQdVpP8SAuL25pp8+OBSpPeamV758u6k/ncsRwIbvMT5K7uI+Gh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