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. 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},"rootSubscene":1,"objects":{"14":{"id":14,"type":"points","material":{"lit":false},"vertices":[[0.0191775914281607,-0.558015108108521,-0.751723349094391],[0.0295607540756464,1.05253851413727,1.45584142208099],[0.549827516078949,0.677683651447296,-0.828603506088257],[-2.27411484718323,0.0384995453059673,0.28977444767952],[2.68255710601807,-0.356381177902222,-0.48005348443985],[-0.361221253871918,0.782844126224518,-0.604829370975494],[0.213355749845505,0.804411590099335,1.46011018753052],[1.07434582710266,-1.90006077289581,0.149679347872734],[-0.66508823633194,0.93578428030014,-1.4333211183548],[1.11395239830017,-0.309051513671875,-0.0103033185005188],[-0.24589641392231,0.263066679239273,-0.212236031889915],[-1.17756330966949,-1.79059183597565,-0.906340181827545],[-0.975850641727448,-0.788258850574493,-2.10215258598328],[1.06505727767944,-1.13302171230316,1.89336049556732],[0.131670638918877,0.363652557134628,-0.968125820159912],[0.488628804683685,-0.28588792681694,-0.102603033185005],[-1.69945061206818,0.517669141292572,0.239959567785263],[-1.4707362651825,-0.102908670902252,0.0608988925814629],[0.284150332212448,-0.974069595336914,-2.17757606506348],[1.33732044696808,1.27067232131958,-0.117860145866871],[0.236696287989616,0.960864782333374,0.112294785678387],[1.31829333305359,0.768721342086792,0.00788619741797447],[0.5239098072052,1.03593075275421,1.87774384021759],[0.606748044490814,-0.473887085914612,2.15875649452209],[-0.10993567109108,-1.27533483505249,0.709714531898499],[0.172181710600853,-0.305620670318604,0.766983389854431],[-0.0903272852301598,2.21176958084106,-0.308211416006088],[1.92434334754944,-1.04166841506958,1.01200187206268],[1.29839277267456,-1.14652383327484,-0.919051587581635],[0.7487912774086,-1.67532730102539,0.563380062580109],[0.556224346160889,1.52593863010406,0.322482734918594],[-0.548257291316986,0.554185509681702,0.366674363613129],[1.11053490638733,1.99311029911041,1.12983512878418],[-2.61233425140381,-0.154120743274689,-0.941498100757599],[-0.155693769454956,2.56440830230713,0.217837646603584],[0.433889776468277,1.0619992017746,1.41541230678558],[-0.381951123476028,1.14269483089447,-0.383733034133911],[0.424187570810318,1.12383890151978,-0.174086377024651],[1.06310200691223,-0.397001504898071,-0.221744522452354],[1.04871261119843,-0.823261141777039,-1.00952875614166],[-0.0381028950214386,-0.578884601593018,0.480725258588791],[0.486148923635483,1.7637894153595,1.60440731048584],[1.67288255691528,0.132992148399353,-1.51502454280853],[-0.354361176490784,0.376499325037003,-1.41602396965027],[0.946347892284393,1.13870763778687,0.876777350902557],[1.31682634353638,1.24126303195953,0.624132394790649],[-0.296640038490295,0.612090945243835,2.1122772693634],[-0.387213587760925,-0.429380089044571,-0.356124401092529],[-0.785432636737823,1.36046135425568,-1.06446421146393],[-1.05673682689667,-0.0708574280142784,1.0771164894104],[-0.795541405677795,-0.272153675556183,1.18157553672791],[-1.75627541542053,-2.44668006896973,0.19839209318161],[-0.690537869930267,0.0654866397380829,-0.400405257940292],[-0.558542013168335,-1.09850895404816,0.616154253482819],[-0.536663353443146,-0.633178174495697,1.97415673732758],[0.227127134799957,-2.06365442276001,1.88466227054596],[0.978454947471619,2.64893198013306,-1.58862054347992],[-0.20888264477253,-1.15339839458466,-0.539923191070557],[-1.39941048622131,-0.340637862682343,-1.16946148872375],[0.258537292480469,0.786362588405609,0.5591059923172],[-0.441799461841583,-1.27051305770874,-1.81934726238251],[0.568599879741669,0.542141556739807,0.393343985080719],[2.12685036659241,0.0751058980822563,0.0421341061592102],[0.424858450889587,0.558514416217804,1.17966413497925],[-1.68428158760071,0.415406405925751,-0.256921172142029],[0.249401777982712,-1.45229971408844,-1.0563360452652],[1.072838306427,0.941206097602844,0.198777198791504],[2.0393693447113,-0.338935881853104,0.650533556938171],[0.449453771114349,-0.0755742490291595,0.343913346529007],[1.39181399345398,0.0402043908834457,1.4775322675705],[0.426566541194916,0.124301068484783,0.0720257014036179],[0.107583992183208,-0.998432576656342,2.12644457817078],[0.0222947336733341,1.23339009284973,-1.47619688510895],[0.603610992431641,0.340424478054047,0.407888501882553],[-0.262650579214096,-0.472702473402023,1.39397776126862],[-0.528264105319977,0.708753049373627,0.360278308391571],[0.192149415612221,-1.52895867824554,0.65455025434494],[-1.14619970321655,0.237425342202187,1.05215537548065],[0.84618467092514,-1.31281423568726,-1.97955513000488],[0.0817196294665337,0.747028589248657,1.20838558673859],[-1.30511701107025,-1.56251847743988,-0.169280081987381],[-0.944912075996399,0.0710533559322357,0.295029759407043],[0.45434159040451,-0.639534771442413,1.26634061336517],[-0.855202496051788,-0.845195710659027,-1.13534331321716],[-0.286895215511322,0.675244688987732,-1.13105380535126],[0.894961655139923,1.15337574481964,0.109993383288383],[0.067304439842701,-1.68650472164154,0.85290539264679],[-0.162676334381104,-0.902814924716949,-0.234337866306305],[-0.827310144901276,1.3176337480545,2.08668851852417],[1.87650561332703,1.10018968582153,-0.110919371247292],[0.766440212726593,1.20376789569855,-1.39284706115723],[0.979956686496735,-1.43127071857452,-1.14229071140289],[1.32178103923798,1.38291084766388,1.70460867881775],[-1.11971080303192,0.00312594044953585,-0.0800736322999001],[0.514599800109863,-0.0778868272900581,-0.437281250953674],[-1.50909984111786,0.4414282143116,-0.119215093553066],[1.53274142742157,0.128922894597054,0.786462843418121],[0.429147362709045,-0.830214262008667,-0.578945219516754],[0.122103415429592,-0.503592908382416,-0.145426884293556],[-1.13801240921021,-1.1936411857605,0.526457965373993]],"colors":[[0,0,0,1]],"centers":[[0.0191775914281607,-0.558015108108521,-0.751723349094391],[0.0295607540756464,1.05253851413727,1.45584142208099],[0.549827516078949,0.677683651447296,-0.828603506088257],[-2.27411484718323,0.0384995453059673,0.28977444767952],[2.68255710601807,-0.356381177902222,-0.48005348443985],[-0.361221253871918,0.782844126224518,-0.604829370975494],[0.213355749845505,0.804411590099335,1.46011018753052],[1.07434582710266,-1.90006077289581,0.149679347872734],[-0.66508823633194,0.93578428030014,-1.4333211183548],[1.11395239830017,-0.309051513671875,-0.0103033185005188],[-0.24589641392231,0.263066679239273,-0.212236031889915],[-1.17756330966949,-1.79059183597565,-0.906340181827545],[-0.975850641727448,-0.788258850574493,-2.10215258598328],[1.06505727767944,-1.13302171230316,1.89336049556732],[0.131670638918877,0.363652557134628,-0.968125820159912],[0.488628804683685,-0.28588792681694,-0.102603033185005],[-1.69945061206818,0.517669141292572,0.239959567785263],[-1.4707362651825,-0.102908670902252,0.0608988925814629],[0.284150332212448,-0.974069595336914,-2.17757606506348],[1.33732044696808,1.27067232131958,-0.117860145866871],[0.236696287989616,0.960864782333374,0.112294785678387],[1.31829333305359,0.768721342086792,0.00788619741797447],[0.5239098072052,1.03593075275421,1.87774384021759],[0.606748044490814,-0.473887085914612,2.15875649452209],[-0.10993567109108,-1.27533483505249,0.709714531898499],[0.172181710600853,-0.305620670318604,0.766983389854431],[-0.0903272852301598,2.21176958084106,-0.308211416006088],[1.92434334754944,-1.04166841506958,1.01200187206268],[1.29839277267456,-1.14652383327484,-0.919051587581635],[0.7487912774086,-1.67532730102539,0.563380062580109],[0.556224346160889,1.52593863010406,0.322482734918594],[-0.548257291316986,0.554185509681702,0.366674363613129],[1.11053490638733,1.99311029911041,1.12983512878418],[-2.61233425140381,-0.154120743274689,-0.941498100757599],[-0.155693769454956,2.56440830230713,0.217837646603584],[0.433889776468277,1.0619992017746,1.41541230678558],[-0.381951123476028,1.14269483089447,-0.383733034133911],[0.424187570810318,1.12383890151978,-0.174086377024651],[1.06310200691223,-0.397001504898071,-0.221744522452354],[1.04871261119843,-0.823261141777039,-1.00952875614166],[-0.0381028950214386,-0.578884601593018,0.480725258588791],[0.486148923635483,1.7637894153595,1.60440731048584],[1.67288255691528,0.132992148399353,-1.51502454280853],[-0.354361176490784,0.376499325037003,-1.41602396965027],[0.946347892284393,1.13870763778687,0.876777350902557],[1.31682634353638,1.24126303195953,0.624132394790649],[-0.296640038490295,0.612090945243835,2.1122772693634],[-0.387213587760925,-0.429380089044571,-0.356124401092529],[-0.785432636737823,1.36046135425568,-1.06446421146393],[-1.05673682689667,-0.0708574280142784,1.0771164894104],[-0.795541405677795,-0.272153675556183,1.18157553672791],[-1.75627541542053,-2.44668006896973,0.19839209318161],[-0.690537869930267,0.0654866397380829,-0.400405257940292],[-0.558542013168335,-1.09850895404816,0.616154253482819],[-0.536663353443146,-0.633178174495697,1.97415673732758],[0.227127134799957,-2.06365442276001,1.88466227054596],[0.978454947471619,2.64893198013306,-1.58862054347992],[-0.20888264477253,-1.15339839458466,-0.539923191070557],[-1.39941048622131,-0.340637862682343,-1.16946148872375],[0.258537292480469,0.786362588405609,0.5591059923172],[-0.441799461841583,-1.27051305770874,-1.81934726238251],[0.568599879741669,0.542141556739807,0.393343985080719],[2.12685036659241,0.0751058980822563,0.0421341061592102],[0.424858450889587,0.558514416217804,1.17966413497925],[-1.68428158760071,0.415406405925751,-0.256921172142029],[0.249401777982712,-1.45229971408844,-1.0563360452652],[1.072838306427,0.941206097602844,0.198777198791504],[2.0393693447113,-0.338935881853104,0.650533556938171],[0.449453771114349,-0.0755742490291595,0.343913346529007],[1.39181399345398,0.0402043908834457,1.4775322675705],[0.426566541194916,0.124301068484783,0.0720257014036179],[0.107583992183208,-0.998432576656342,2.12644457817078],[0.0222947336733341,1.23339009284973,-1.47619688510895],[0.603610992431641,0.340424478054047,0.407888501882553],[-0.262650579214096,-0.472702473402023,1.39397776126862],[-0.528264105319977,0.708753049373627,0.360278308391571],[0.192149415612221,-1.52895867824554,0.65455025434494],[-1.14619970321655,0.237425342202187,1.05215537548065],[0.84618467092514,-1.31281423568726,-1.97955513000488],[0.0817196294665337,0.747028589248657,1.20838558673859],[-1.30511701107025,-1.56251847743988,-0.169280081987381],[-0.944912075996399,0.0710533559322357,0.295029759407043],[0.45434159040451,-0.639534771442413,1.26634061336517],[-0.855202496051788,-0.845195710659027,-1.13534331321716],[-0.286895215511322,0.675244688987732,-1.13105380535126],[0.894961655139923,1.15337574481964,0.109993383288383],[0.067304439842701,-1.68650472164154,0.85290539264679],[-0.162676334381104,-0.902814924716949,-0.234337866306305],[-0.827310144901276,1.3176337480545,2.08668851852417],[1.87650561332703,1.10018968582153,-0.110919371247292],[0.766440212726593,1.20376789569855,-1.39284706115723],[0.979956686496735,-1.43127071857452,-1.14229071140289],[1.32178103923798,1.38291084766388,1.70460867881775],[-1.11971080303192,0.00312594044953585,-0.0800736322999001],[0.514599800109863,-0.0778868272900581,-0.437281250953674],[-1.50909984111786,0.4414282143116,-0.119215093553066],[1.53274142742157,0.128922894597054,0.786462843418121],[0.429147362709045,-0.830214262008667,-0.578945219516754],[0.122103415429592,-0.503592908382416,-0.145426884293556],[-1.13801240921021,-1.1936411857605,0.526457965373993]],"ignoreExtent":false,"flags":34816},"16":{"id":16,"type":"text","material":{"lit":false,"margin":0,"floating":true,"edge":[0,1,1]},"vertices":[["NaN",4,1]],"colors":[[0,0,0,1]],"texts":[["rnorm(100)"]],"cex":[[1]],"adj":[[0.5,0.5,0.5]],"centers":[["NaN",4,1]],"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":[["NaN",4,1]],"colors":[[0,0,0,1]],"texts":[["rnorm(100)"]],"cex":[[1]],"adj":[[0.5,0.5,0.5]],"centers":[["NaN",4,1]],"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":[["NaN",4,1]],"colors":[[0,0,0,1]],"texts":[["rnorm(100)"]],"cex":[[1]],"adj":[[0.5,0.5,0.5]],"centers":[["NaN",4,1]],"family":[["sans"]],"font":[[1]],"ignoreExtent":true,"flags":33808},"19":{"id":19,"type":"abclines","material":{"lit":false},"vertices":[[-2.61233425140381,0,0],[2.68255710601807,0,0],[0,-2.44668006896973,0],[0,2.64893198013306,0],[0,0,-2.17757606506348],[0,0,2.15875649452209]],"colors":[[0.745098054409027,0.745098054409027,0.745098054409027,1]],"centers":[[0.0351114273071289,0,0],[0,0.101125955581665,0],[0,0,-0.00940978527069092]],"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":[[1,1,1,1]],"centers":[[0,0,0]],"sphere":false,"fogtype":"none","fogscale":1,"flags":32768},"15":{"id":15,"type":"bboxdeco","material":{"front":"lines","back":"lines"},"vertices":[[-2,"NA","NA"],[-1,"NA","NA"],[0,"NA","NA"],[1,"NA","NA"],[2,"NA","NA"],["NA",-2,"NA"],["NA",-1,"NA"],["NA",0,"NA"],["NA",1,"NA"],["NA",2,"NA"],["NA","NA",-2],["NA","NA",-1],["NA","NA",0],["NA","NA",1],["NA","NA",2]],"colors":[[0,0,0,1]],"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},"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,20.8793258666992],"modelMatrix":[[0.930384933948517,0,0,-0.0326671414077282],[0,0.330654978752136,1.06753706932068,-0.0233925059437752],[0,-0.908467054367065,0.388551741838455,-20.7838001251221],[0,0,0,1]],"projMatrix":[[3.73205089569092,0,0,0],[0,3.73205089569092,0,0],[0,0,-3.86370277404785,-75.2675476074219],[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.930384933948517,0.966770470142365,1.13604927062988],"viewport":{"x":0,"y":0,"width":1,"height":1},"zoom":1,"bbox":[-2.61233425140381,2.68255710601807,-2.44668006896973,2.64893198013306,-2.17757606506348,2.15875649452209],"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":36176}},"crosstalk":{"key":[],"group":[],"id":[],"options":[]},"width":480,"height":480,"context":{"shiny":false,"rmarkdown":null},"players":[],"webGLoptions":{"preserveDrawingBuffer":true}},"evals":[],"jsHooks":[]}