# Convert 2d mouse to 3d space TRackball?

hi everyone this time i got a simple one for ya:

how can i convert the X,Y pos of mouse to project on the scene space XYZ and them rotate it and draw some more in that space?

like projection a point onto a sphere surface and then rotate the sphere....

thanks hugs bern

by the way Leopard here...

### Re: Convert 2d mouse to 3d space TRackball?

what does "registered idea" mean? sounds IP-esq -- if so, kinda weird that the idea is "registered" despite not having ... an actual implementation! ;) I'm hesitant to give away more details until this is clarified

projection is simple matrix multiplication -- and high school geometry textbook will provide the necessary trig.

### Re: Convert 2d mouse to 3d space TRackball?

hi cwright registered idea was a good idea that come out bad... sorry for it but i got my last project stolen... really sorry if offended kineme principles here...

thanks for the help

### Re: Convert 2d mouse to 3d space TRackball?

The idea of registering writing in 3 dimensions was a waste of your time. Why don't you checkout a Texas Instruments Graphing calculator, logo, uhm... geez... a million books on art theory. I know this sounds extremely snarky, but it makes me chuckle to think of someone defending something like that in court.

### Re: Convert 2d mouse to 3d space TRackball?

shed a weed some green in the forest...

maybe i came out of subject in this post but my question is still valid...

how can i project a point via (maybe javascript) into a sphere? mouse XY to sphere XYZ surface...

thanks bern

### Re: Convert 2d mouse to 3d space TRackball?

It's a valid question, and I don't want you to think that I'm upset or anything (esp for asking -- that's an important thing to do); my qualm is largely with the idea being registered before existing, as if ideas are scarce or something (note that this is a large philosophical topic, and I spend a fair amount of my time pondering it).

When I was a kid, I loved reading Sci-Fi books. Arthur C. Clark, Robert Heinlein, Isaac Asimov, they were my heroes. I devoured everything they (and several unnamed others) wrote. At one point, I came across a kind of autobiography (I forget who it was by). In it, they (the author) outlined how they got started, how they work currently (writing books, stories, etc), and the like. One really interesting point was where the author stated that it was useless for fans to send him ideas for books -- "ideas," he said, were "a dime a dozen" (dime ~= 1/10 €, for the Europeans in the crowd), it was time to actually write the stories/ideas that was scarce. http://www.sfwriter.com/beginner.htm

Musicians often also have similar feelings. As do other creative fields. Real artists ship, they don't just dream.

After you've done creative works for a while, you begin to realize something: ideas aren't at all valuable. Kineme3D is valuable for us, but the idea of rendering 3D meshes in QC is valueless. GLTools is valuable for us (even as a free plugin), but the idea of using GL to render primitives in QC is not. Those ideas are valuable not because they're unique or particularly brilliant (they're not, on both charges), but because someone (me, smokris, beta testers) sat down and implemented the idea. They spent time testing it, refining it, working out the bugs, making performance improvements, finding out what people needed/wanted, and satisfying those needs/wants. That is where value lies -- the execution, not the idea.

Our release rate has dropped markedly over the past year -- this isn't because we're not working anymore (quite the contrary -- I have numerous commits to our repository almost daily), but because the changes are more subtle (small tweaks) or they're on projects of such a large scope that they take a very long time to get to a releasable state (KinemeCore 0.5, PhidgetTools, GraphTools, AudioGraph, countless others). We've raised our own bar to make well-crafted, high performance plugins. Those ideas aren't worth anything -- their implementation, on the other hand, is (regardless of whether the plugin ends up being free or not).

Successful people generally aren't successful because they had a great idea -- they're successful because they had an ok idea, and their execution was fantastic. Take the iPod -- a portable MP3 player; hardly novel at its introduction, not at all novel now. Why does it sell at all? because its execution was leaps and bounds above the competition then, and now (Zune notwithstanding -- I hate the Zune software so much that I haven't been able to actually make use of the physical device). If your idea is where your value is, you're on precarious ground (and you know this -- you stated someone already "stole" on of your previous ideas, by which you likely mean they executed it more quickly or better than you -- I'm guessing here, and could be mistaken, feel free to correct me.)

Now that I'm done with my soapbox -- As for actually performing what you're wanting to, you're going to need to more clearly define what exactly you're trying to do. Do you intend for this to work in a trackball? If so, you'll likely need the Inverse Transform patch from GLTools. Otherwise, I don't see how you're planning on generating the Z coordinate.

### Re: Convert 2d mouse to 3d space TRackball?

Yes cwright, i must agree with you. Ideas are not valuable but the project they give birth is. Or maybe the travel they make us do to reach our goals. but ideas are value, when they travel around the world and make you stutter when you see them built by other people hands. thats when you get confused and happy i guess. so ideas must be protected in some way. and i don't mean placing a raging pittbull at your door step but something like that must be a disciplinary. for instance i got last year a phd proposal that was flunked/reproved by the commission because someone else inside the same collage got the same idea in some other terms but basically the same idea and made it come to reality. Now i got to talk to person and the teachers responsible and what they all said was that i should not talk about what i am going to do this level. so i got kinda pissed because it was about something that was going to really like to investigate and i see my scholarship funds go away. so did mom and dad pocket money... and and and....

As for the rest cwright this project that i am working on is for my masters degree that is going to aim for a platform based on QC and some drawing tools that i am going to build, that let students draw in 3d. Thats why i say it is registered, it is in my masters proposal so it is copyrighted.

i am sorry again for giving the wrong idea here. i think you all do a great work needed to point us all in the wright direction...

But for the composition, i found here a yonamano compositions that built a trackball with a 3dTransform and mouse patch. but the problem is that when i rotate the trackball so will the mouse coordinates i guess. please see he attached comp..

hugs bern

PreviewAttachmentSize
Masters3dTool_question1.qtz7.63 KB

### Re: Convert 2d mouse to 3d space TRackball?

Quote:
As for actually performing what you're wanting to, you're going to need to more clearly define what exactly you're trying to do. Do you intend for this to work in a trackball? If so, you'll likely need the Inverse Transform patch from GLTools. Otherwise, I don't see how you're planning on generating the Z coordinate.

i tried the inverse rotation patch but i cant seem to get the inverse transf patch... ... keep trying... b

### Re: Convert 2d mouse to 3d space TRackball?

Hey, that's an interesting problem -- trying to always draw in a frontal 2D plane, then rotate the drawn image into z space and continue drawing. I'd think you might somehow do the drawing in 2D space outside the trackball then rotate a copy (iteration?) inside the trackball?

### Re: Convert 2d mouse to 3d space TRackball?

i have been messing with unity lately, in particular with BB_UNI_TUIO. i like BB code, he's a real cocoa guru. anyways BB's approach to selecting a 3d object from xy coordinates in unity is ray casting a touchable object onto a 2d plane in the screen space of your camera. i must say it is simpler said on my part than implemented as i'm still trying to grasp this concept. so in quartz terms glsl and cl both i believe can do various forms of ray casting and tracing which might enable you to do a hit test of your 3d object from a 2d plane by using only xy coordinates. more than likely you will have to implement this ray cast each time you rotate your object in order to paint your z depth. so like you questioned you will need some sort of 3d transform rotation ie..trackball type controls to rotate the object but also a ray casted plane in which you are hit testing your object. it seems very complicated to be done because you will have to be doing some sort of accumulated texture feedback only on the object needed. i have thought about doing something like this before with a masked brush, in addition to some sort of perlin noise displacement height map, but i ran into some lighting issues and found unity 3d is procedurally more suited for this type of thing. however there are some examples on this forum of similar texturing techniques particularly submitted by TB. so i would suggest checking some of TB's posts as he has perlin noise and ray tracing examples.

as per getting xy coordinates to do 3d rotations you will more than likely have to do some sort of quaternion math. nothing complicated like when making fractals etc.. here is the code i used to make my quaternion trackball. im not running leopard anymore so making a leopard build of the trackball i am unable to do but here is the basic math functions i re factored to expressions and java scripts in in order to make a trackball. like i said you check the repository and convert all the vector patches to clips and use the screen pic to assemble in leopard as i didn't use anything proprietorially SL. this is the funtion you will want to use "ThreeVector_t eulerAnglesInDegreesFromQuaternion" for complete code search "trackball" in apples dev example code.

```static CGFloat safe_sqrt(CGFloat x) {
if (x <= 0) return 0.;
else return sqrt(x);
}

static CGFloat distance(ThreeVector_t a, ThreeVector_t b) {
CGFloat x = a.x - b.x;
CGFloat y = a.y - b.y;
CGFloat z = a.z - b.z;
return safe_sqrt(x*x + y*y + z*z);
}

static ThreeVector_t normalize(ThreeVector_t a) {
CGFloat normalizer = distance(a, (ThreeVector_t){0, 0, 0});
a.x /= normalizer;
a.y /= normalizer;
a.z /= normalizer;
return a;
}

static Quaternion_t multiplyQuaternions(Quaternion_t q1, Quaternion_t q2) {
Quaternion_t result;
result.x =  q1.x * q2.w + q1.y * q2.z - q1.z * q2.y + q1.w * q2.x;
result.y = -q1.x * q2.z + q1.y * q2.w + q1.z * q2.x + q1.w * q2.y;
result.z =  q1.x * q2.y - q1.y * q2.x + q1.z * q2.w + q1.w * q2.z;
result.w = -q1.x * q2.x - q1.y * q2.y - q1.z * q2.z + q1.w * q2.w;
return result;
}

static ThreeVector_t eulerAnglesInDegreesFromQuaternion(Quaternion_t q1) {
CGFloat p0, p1, p2, p3;
p0 = q1.w;
p1 = q1.z;
p2 = q1.y;
p3 = q1.x;
CGFloat e = 1.;

CGFloat theta1, theta2, theta3;

CGFloat test = 2*(p0*p2 + e*p1*p3);
if (abs(test) > .999) { /* top or bottom singularity */
theta3 = 0;
theta2 = signbit(test) ? -M_PI/2. : M_PI/2.;
theta1 = atan2(p1, p0);
}
else {
theta3 = atan2(2*(p0*p1 - e*p2*p3), 1 - 2*(p1*p1 + p2*p2));
theta2 = asin(2 * (p0*p2 + e*p1*p3));
theta1 = atan2(2*(p0*p3 - e*p1*p2), 1 - 2*(p2*p2 + p3*p3));
}

/* We get values in the range (-PI, PI).  Let's convert those to the range (0, 2 PI) so that we don't display negative angles to the user. */
if (theta1 < 0) theta1 += 2 * M_PI;
if (theta2 < 0) theta2 += 2 * M_PI;
if (theta3 < 0) theta3 += 2 * M_PI;

const CGFloat radiansToDegrees = 180. / M_PI;
}

static Quaternion_t quaternionFromAxisAndAngle(ThreeVector_t axis, CGFloat angle) {
Quaternion_t result;
CGFloat s = sin(angle / 2.);
result.x = axis.x * s;
result.y = axis.y * s;
result.z = axis.z * s;
result.w = cos(angle / 2.);
return result;
}```

### Re: Convert 2d mouse to 3d space TRackball?

FWIW, sorry that I came off harsh, it's just that I set up something like that about a year ago, and I didn't even think of the idea as being novel (again, TI graphing calculators, and a million and one drawing programs that are already in existence) so the idea of someone coming along and "registering" it rubbed me wrong...especially considering that you don't even know how to do it yet. I see your point about it being irritating for a truly novel idea to get usurped, it's just that in my opinion, this one isn't that novel.

Also, it's pretty easy to use my repository comp, "gt lines" in conjunction with the trackball mode, to draw in 3 dimensions, by grabbing the viewer, and shifting the line trajectory.

### Re: Convert 2d mouse to 3d space TRackball?

Say what you will, Quaternion math is kinda hard to understand ;)

### Re: Convert 2d mouse to 3d space TRackball?

sorry, it's called "inverse rotation", not inverse transform (transform would undo linear displacement, which isn't as difficult or interesting...)

[edit: this patch seems to be buggy in the latest GLTools release -- it only evaluates once, instead of continuously... will be fixed in the next release, sorry :/]

### Re: Convert 2d mouse to 3d space TRackball?

Also, just consider tying z to a scroll output if you want to make your life easy.

### Re: Convert 2d mouse to 3d space TRackball?

bernardo wrote:
As for the rest cwright this project that i am working on is for my masters degree that is going to aim for a platform based on QC and some drawing tools that i am going to build, that let students draw in 3d. Thats why i say it is registered, it is in my masters proposal so it is copyrighted. hugs bern

So I'm registering this idea of a water turnbine that produces 9 times the energy input to spin it as excess rotational torque and energy and can be manufactured for less than A\$1000. I know an Austrian genius call is supposed to have built and 'registered' it over 50 years ago but why should that stop me claiming something I have no idea how to build even though it's simple! Happy new year bernardo.

Seriously, if 'a drawing in 3D application based on QC' qualifies as a Masters thesis these days I'm glad I walked out on teaching Uni 8 years ago. Having said that I hope you produce something really awesome so i can eat my words ;) So many apps like this out there already so how you think you can 'register' the idea to any effect I've got no idea :)

### Re: Convert 2d mouse to 3d space TRackball?

Rhonda does that, for example: http://rhondaforever.com/

### Re: Convert 2d mouse to 3d space TRackball?

not touching on the merit of this (QC can be used for thesis-worthy things, in my opinion, especially when it comes to OpenCL, GLSL shaders, and possibly CoreImage kernels), but I mocked up a simple (and slightly wrong) composition that does this with a bit of javascript and GL Point Structure, and it is indeed pretty rad ;) much more fun than I was initially expecting :)

(and in so doing discovered some rotation bugs in GLTool and Kineme3D to be addressed... oops)

### Re: Convert 2d mouse to 3d space TRackball?

Kineme MultitouchPatch, perhaps? Magic Mouse to X and Y concurrent with wired mouse to Z?

### Re: Convert 2d mouse to 3d space TRackball?

Yeah I was about to mock up similar comp but it's 2:30am here — how about posting yours cwright ;). I'm sure QC is thesis ready esp. OpenCL GLSL and CI filters et al. Just got a vibe from the tone of the question that we're talking paint with blobs on rotating canvas(es)… If however it's a serious app being developed, asking how to get around the trackball patch kind of made me think "hello". (And who's writing this 'thesis' anyway) ((would you attempt something like Rhonda in QC? I think not, at least not until the Kineme CoreImage plugin makes bezier curves easily available inside QCs 3D space at least))

I've turned over a new year's leaf and lost the negativity — so bring it on 3D drawing apps inside QC!!!

Was interesting to see the rhonda video not sure if it's a new video or one from 6 months ago but seemed more impressive this time around. An illustrator could make some fine MusicVideos with this especially with DXF export for texturing and post.

### Re: Convert 2d mouse to 3d space TRackball?

It's so trivial it makes my head want to pop : ) Make a coordinate in the javascript for z, then hook that to the scroll.

Toneburst has done something similar with different javascript, to add some randomness to his line drawing stuff. One of the first things I did with particle paint was to hook a y scroll to the z param. I feel like this has been touched on sooo much already. My qtz vid for a song "dream a dream" is value historian recorded movement of me painting in 3D space, w/ a fake cam.

Eh, it's the holidays, check the attachment. Try to do a different spin on it I guess, or declare source.

PreviewAttachmentSize
3D Drawing Javascript Queue with Trackball.qtz7.57 KB

### Re: Convert 2d mouse to 3d space TRackball?

& Rhonda exports dxf models that you can employ directly or export as .dae from the AutoDesk SDK Convertor application.

### Re: Convert 2d mouse to 3d space TRackball?

That swaps over fairly nicely to become a Mesh rendering structure, nice example GT. Happy New Year to you and all the Kineme community. Find attached an OpenCL version of your posted example, GT.

### Re: Convert 2d mouse to 3d space TRackball?

Actually, my original version used OpenCL, but then I made it backwards compatible because:

# 2- What is the point in limiting the OS's it can operate in?(rhetorical question).

Oh, I see, LOL.

### Re: Convert 2d mouse to 3d space TRackball?

I couldn't get Rhonda's dxf models to work in QC via Kineme3D. A couple of us posted comments to that effect in the Rhonda forums. Maybe that's been rectified by somebody at Rhonda by now? Haven't tried for a while. I'll have to try that autodesk dae conversion, too.

Hehehe...

### Re: Convert 2d mouse to 3d space TRackball?

Oh boy, I was looking forward to some cross app productivity but the .dxf produces actually crashes the composition, and the .fbx to .dae I am still trying to get reliable results, but perseverance is the name of the study here I think.

Jumped before I looked on that one :-) .

### Re: Convert 2d mouse to 3d space TRackball?

uau! so many discussions going on here, first things first:

for my masters thesis the main investigation i cannot disclose. but rest asure that it is not a tool for drawing in 3d. to let inform right: when you apply for a scolarship you are making a contract and you have to fill a form called "state of the art" and that where you point why is your investigation to usefull that someone must pay you to make it.

for the "inverse rotation" the bugg has been spotted also here.

for the fun it takes in drawing in 3d glad you could find also cwright. for i done some plugins in MAXSCRIPT that did something like that and it is kinda cooll.

for the rhonda yeah fck yeah!!!! thats it something like it but more of mine and less of them

cwright could you post your patch?

really glad i rose so many questions. as for your concept of ideas, i'm starting to think that if we don´t defend them oh well...

### Re: Convert 2d mouse to 3d space TRackball?

I checked back into the Rhonda forums just now. Scatchpole was the other person noting the issue. I was hopeful that there might have been a response to the QC bug by now but nobody seems to have replied and it's been quite a few months. Oh well ... they aren't super active in there I guess.

### Re: Convert 2d mouse to 3d space TRackball?

note that this submission is not an endorsement for this whole registration idea stuff -- however, I do feel it's a good instructional posting. ;)

Note that this will almost certainly NOT work with the latest GLTools, as the Inverse Rotation bug prevents it from updating the in-trackball orientation. I've got it fixed on my build, and we should have an updated build available in a day or two to rectify this (and some other bugs I noted above).

PreviewAttachmentSize
draw in space.qtz4.72 KB

### Re: Convert 2d mouse to 3d space TRackball?

thank you cwright i'll see it soon, and i just wish you could forget the registration idea stuff i am getting really tired of the hamering in the situation. as i said the thesis is registered, not the application as for when i finished you all will be the firt to have it....

### Re: Convert 2d mouse to 3d space TRackball?

bernardo wrote:
i just wish you could forget the registration idea stuff i am getting really tired of the hamering in the situation.

I entirely understand -- I just wanted to be clear above (I mark tons of things as "non-endorsements" when filling in some blanks, not just this).

### Re: Convert 2d mouse to 3d space TRackball?

If you liked Rhonda ... check out withDRAWal from JTNimoy. Ten interactive scribble styles. Very nice. Scratchpole posted the link in the Rhonda forums back in September and it's also been posted somewhere here at Kineme too, I think.

http://jtnimoy.net/?q=170

### Re: Convert 2d mouse to 3d space TRackball?

bernardo, your question incited an interesting discussion and great examples! a particularly fertile thread -- to see steve mokris' 3D queue in gtoledo's post (such a simple twist!), to see dust's code for the trackball, to see cwright's (most immediately useful of all) javascript patch, then to apply the JS to the mesh tools in QC4... the rhonda / GL drawing app... cool!

then there's the discussion on intellectual rights -- so much gray area for this period in history, and to see the philosophical discussion unfold... very interesting.

happy new year (and decade), kineme community.

### Re: Convert 2d mouse to 3d space TRackball?

i am really glad where this thread has lead me/us as for the grey areas we only know they are there if we are black and white... i am looking ate your patch and i got alot to learn really alot from it.

thanks cwright and everybody for the posts... will be back soon

### Re: Convert 2d mouse to 3d space TRackball?

hi there c. did you ever posted a fixed gl tools Inverse rotation patch that does not update.? i am working on the rest of the app, mainly saving and loading viewpoints to plist now... and trying to lear some more trig mainly the matrix funcitons. wich seam kinda hard but its a path...

thanks bern

### Re: Convert 2d mouse to 3d space TRackball?

here is something i made a this summer. you might find this approach could be cool. this is automated of course but you may find that using something like gl look to follow the strokes in 3d space to be useful rather than always having to rotate ? i'm still a little unclear what your trying to make but it seems to me your making some sort of grant proposal / thesis project and you want to keep the particulars private. i imagined that you want to just paint on a object but maybe there is more to this that im not getting.

anywho i understand the need for privacy as i have been consulting under an NDA as of late, as well as doing some grant cluster initiative type of things on campus which is totally open. so i get where your coming from however i think the best way to get help on this public forum is to not discus anything you are are to ®egister openly.

or at at least mask the explicit intent of the project you need help with something a little more vague or implicit so you can get answers without divulging to much info i guess might be best.

that is to not say that people here do not work on sensitive projects or that people do not protect there projects but usually if your needing help from kineme on a project like that its best to email chris privately for help because this is a public forum and its hard to help when your only giving a limited amount of info.

i have actually been trying to practice this sort of open forum etiquette in regrades to intellectual properties, crediting, and non disclosure agreements etc... i have been guilty a few times slipping up and disclosing to much info about things that are beta and under NDA on this forum so im not one to preach.

blah blah

so i checked out rohnda a few months ago on someones blog. watched a few videos thought it was interesting. it looks pretty difficult if you ask me. but then again i haven't downloaded the program because im used to organically modeling with things like mudbox.

hugh i thought kineme 3d could take a dxf i guess i was wrong, didn't know people still exported models in dxf ? i mean certainly you could take a dxf model from rhonda and convert to dae or fbx for use with quartz composer ?

[qc/patch] here is a 3d stroke writing experiment from a long time ago. its audio reactive meaning the im queuing the audio spectrum in verts to render so you will need to turn on some audio or talk to your computer to see the effect.

PreviewAttachmentSize
audio23dlook.qtz90.2 KB

### Re: Convert 2d mouse to 3d space TRackball?

hi there dust, thanks alot for your comments. i'll soon see you patch. the campus enviorment sometimes can be a litle more like a swamp here in portugal but thats their problem not mine. i shall take your advice in to much account. as for work in a grand puzzles the pieces don´t need to fit inside the box i guess. as for painting in a object that would be fairly simple to make and i wouldn´t go to the trouble of making a software my self. as an 3d artist i am kinda used to do that on a daily basis.

yes it is possible to convert models from dxf to fbx and dae i do it alot while working with architects that seem to know anything of 3d there is allways mudbox and zbrush and plenty of drawing basis modelers but that is not what i am looking for again.

thanks alot again for yours insights.

as for the export options i guess i'll try first XML from qc via plist files... as for now i just need points...

please don't expect anything super duper tech evolved. i am not a software developer. just some one that needs a hammer to smash a picture on the wall.

.

### Re: Convert 2d mouse to 3d space TRackball?

i forgot to mention that english is not my main language. so sorry for some mistakes.

### Re: Convert 2d mouse to 3d space TRackball?

not posted yet (it's only been a couple days), it'll be a beta release of gltools 1.5 or something

### Re: Convert 2d mouse to 3d space TRackball?

The history of that particular queue thing, is that SL comes with a mouse ribbon example that has a 2D queue, that is hooked to OpenCL mesh. The problem was that the queue would never "back down" after being raised to a certain amount. Smokris graciously pointed out the splice function in private emails, in the context of a 2D queue. I added in the third dimension for the post above.

So it's a "co-queue" ;-) , and I wanted to make sure to credit Steve for mentioning the splice function that drops the queue to the correct value after it's been raised.

I have to say... cwright's is still in 2D, as far as I can see, though the inverse transform is a good point :-)

### Re: Convert 2d mouse to 3d space TRackball?

Totally OT, but it is weird as all to see 2010 in the post date.

Shouldn't we have hover-boards by now? What the heck.

### Re: Convert 2d mouse to 3d space TRackball?

yeah, and where's my hard-AI PDA? ;)

### Re: Convert 2d mouse to 3d space TRackball?

it's only 2d as far as input goes (mouse X/Y coordinate pair) -- it then multiplies the point (X,Y,0) through the inverse transformation matrix (via inverse rotation), to get a true-blue X,Y,Z position. so it's really drawing in space, just along the current view plane (however that is oriented -- usually it's the Z/Y plane, but if you track ball around you get other planes as well.)

### Re: Convert 2d mouse to 3d space TRackball?

Joining this thread a bit late. Great examples and discussion, it's a fine line;) that we often walk down. Damn academia for commercializing knowledge transfer.

Thanks for sharing and happy new year to you all. Obrigado,ano novo feliz.

### Re: Convert 2d mouse to 3d space TRackball?

I realize that one of the more useful things would be to get "pen up/pen down" stuff going. Any time I've experimented with that, I haven't been able to get non-contiguous lines going; lines with gaps.

### Re: Convert 2d mouse to 3d space TRackball?

yeah thanks c gt3 and the rest... hover hover 2010

### Re: Convert 2d mouse to 3d space TRackball?

maybe some multidimensional arrays will sort this out will check into it....

### Re: Convert 2d mouse to 3d space TRackball?

your English is good my friend. I have been working on re learning how to articulate an enunciate correctly in my native language. i lived with a french guy for over a decade so i picked up the English is my second language accent. I moved east and everyone kept asking me where i was from ? no worries

### Re: Convert 2d mouse to 3d space TRackball?

ok so i am basically where i left of, but now my problem lies where and how can i make the contiguous lines in Kineme GL lines structure break. so i thought i should build a multidimensional array: some 2d structure.

so i got this javascript:

```var result = new Object();
result.Lines = new Array();

function (__structure Lines) main (__index Count, __structure StrcutIn)
{

result.Lines[Count] = new Array();
result.Lines[Count][0] = StrcutIn;// Line Draws
return result;

}```

basically when i go mouseDown the counter patch sends another new level to the 2d array and passes the structure into that level. can anyone help?

thanks bern

### Re: Convert 2d mouse to 3d space TRackball?

hi there mr.c. is there any chance for a correction in the update mode of the kneme gl inverse rotation patch? please

### Re: Convert 2d mouse to 3d space TRackball?

By contract, I cannot contribute source code to kineme at present. As such, someone else like smokris will need to make/release the appropriate change.

### Re: Convert 2d mouse to 3d space TRackball?

sorry i forgot. the apple. then i shall make the request to smokris. PLEASE mr Smokris could you?

thanks mr c.

### Re: Convert 2d mouse to 3d space TRackball? - smokris help

OK so now i installed the GL.TOOLS 1.2 and the Kineme GL Inverse Rotation works getting happy with some nice results that show m the way to go... mr. smokris help

thank you

### Re: Convert 2d mouse to 3d space TRackball?

I'm a little confused here, besides do you really want to run a structure into the JS , aren't you wanting to generate a structure that you can break & restart?

maybe I'm missing your point entirely.

see what sense I made thus far - not your current script - but not terribly different.

uses mouse for user input of x and y values into a 2d JS generated queue.

PreviewAttachmentSize
2d lines - no interactive break.qtz2.7 KB

### Re: Convert 2d mouse to 3d space TRackball?

hey thanks cybero, but my point is quite simple i basically want to draw a line that i can break when the mouse is releases. so we came up with the same kind of solution but i need to store a structure in a another structure that keeps on growing... will check it with you push command and post soon... hugs bern

### Re: Convert 2d mouse to 3d space TRackball?

this is the error i keep getting:

```0x9106d591: -[QCContext renderPatch:time:arguments:]
0x9106d366: -[QCGraphicsContext renderPatch:time:arguments:]
0x9106c26b: -[QCOpenGLContext renderPatch:time:arguments:]
0x9106c10a: -[QCPatch(Runtime) render:arguments:]
0x0000e3aa
0x910f323f: -[QCView render:arguments:]
0x910f5062: -[QCView _renderTimer]
0x9113af44: _TimerCallback
0x9280c8f5: CFRunLoopRunSpecific
0x9280caa8: CFRunLoopRunInMode
0x954e32ac: RunCurrentEventLoopInMode