My first C4D plugin.

Well, I understand it again, at least. It states that if the vector from the point to the origin has a lower deltax than deltay it has to be on the front.

Exactly how I can prove that mathematically I forget at the moment. But I don't feel bad.
I've at least proved it in my head visually. Or maybe that's where the proof lies. ?.
because the dy would point away counter clockwise from the point, leaving it on the front side.
That is, the point would lie clockwise of the vector (within 180deg).

So, I can prove it graphically.haha. Does that count? lol, my bad.
 
Last edited:
Took me awhile but I did it...

From the equation of a plane, Ax + By + C = 0.
Rearranging y = mx + b I get...
(dy)x + (-dx)y + C = 0 where b IS the constant C.

Therefore if dy > dx then the result is greater than zero and the point lies on the front side of the plane.

SOLVED. WHOOHOO. I may be slow at the moment, but yeah baby. I knew I did that once.

//Edited: Ah hell, no more digging. Thats the proof. Make that a function and forget about it.
-Cheers.
 
Last edited:
Hey Raptor cool, I did'nt go as far as working out which way Left/Right is because I knew that its relative to how you set up your co-ordinate system, hence I just said do it relative to the line itself, its kinda the sort route (I always look for the simplelest soultion usually ) :)

Sorry for my rubbish handwriting, its an old habit, I write stuff quickly, I think a graphical method is just as valid (in most cases) as the algerabic form, just different forms of expressions. I tend to work in the visual side more than the written side lol probably why I'm into filmmaking!

I'm gonna go try digg up some cool stuff up, but yea I know the feeling, once I have a working code I very rarely change it, just copy and paste for new projects.

Cheers for the brain exercise!
 
EDIT::

Man I just realised you said you coded Doom2 or a at least a version of, man thats just above par! :shocked:

I mean game programming takes a person with a hell of lot of skills to do, very rare indeed, damn Raptor my respect for you is even higher! "you da man!" as the kids say around these parts.
:thumbsup:
 
Last edited:
Yeah, I just had to kick the neice off the computer for 5 minutes so I could check up.

I do this stuff as a personal exercise so when I hit the eureka, again, it's a personal thing. Not that you didn't solve it yourself. I wanted to make that very clear.

And when I said "Make that a function and forget about it." I meant the public, not you.

Sometimes I get public you's and private you's sort of in the wrong context.
Very important that I clear that up.

Anhar, man, you rock.
Gotta give it up for the niece again. haha. Nice chattin with ya man.

//You say your going to dig something up? Whoohoo. Dos or windows? Do I have to pull out my old Rhide compiler? haha.
 
Last edited:
Hey Anhar. I suppose if you tested the tangents of the original line against the line of the point to the origin then that could work too.

And since x1,y1 are common to both equations you would really be testing the slopes y2/x2 - y/x. Maybe that's what you were doing, not sure. But that's a valid statment as well.

I started off trying to solve that way first last night before I went down a side road, and then into a ditch I think, lol. Oh well, I had fun.
 
That point on line side thing was still bugging me because he had no constant in his original code.
So I did it again by comparing the tangents and I'm sure that is how he approached it. It looks better now, except for my lousy writing.

pols.jpg


In looking at yours Anhar I see that's how you went at it but had M(p) different.
 
Last edited:
Hey raptor, your writting is far more organised then mine lol ! yep thats pretty much like mine, I figured that if you take a common point then that cancels out the constant,

I think its one of those things that you can do more than one way :)


I'm just in coding hell right now as I type (my Code project for one of my Modules), I have to parse 21,578 documents and do text analysis, then dump them into an Database, now lets just say my version one was finished weeks ago BUT was soooooo damn slow,

Luckly we have been given a months extension, (Well its nearly over now, 1 week left approx) and my verison 2 is nearly finished:

Version One Calculation time:

Aprroximatley 7 Hours

Version Two with Heavy optimasation :

25 ~45 Minutes Yahooooo!

Yea I know I had to pretty much scrap version one, and RE WRITE the entire code AGAIN arrgg ! :( but it was worth it I think.
 
Is this for school? What language are you writing in?
I'd say rewriting it was worth it for sure.

Optimizing can be fun in a challenging kind of way.

Sounds like fun. Good luck.
 
Well "School" as in University yes (Master Degree {Information Systems aka Advanced Computer Science})

as for the language, well we was told to do it in Java, buuuut I tried to learn the language, but its implementation is just bizzare, I've learned FORTAN in two weeks so I assumed foolisly that Java would be easy to learn, turns out it does'nt act like the way you think. I'm not going to bash it, I'll just admit it wasn't for me.

Anyways given my situation I fell back into the language that I use when I need to get the goods churned out VB6 !

Yea I know how most "Programmers" look down on VB,

but I say thats unfair to judge me that way because at least I've worked all the way from Transistor level to Machine languauge then to other languages then VB, so I think I've earned my right to be lazy :) lol

So its not like anyone can acuse me of not knowing whats happing "under the hood", because I could take anyone all the way down to the "TGEHP" level thats "Thermally Generated Electron Hole Pairs", and yes the Profs at Cambridge made us learn this wonderful world, then took us up slowly level by level, past microelectronics (eg Logics gates, ALU, Registers) then taught us to code in machine language, then about power electronics Kirchoffs law etc.....

I done a bit of C++, Python, Matlab(not strictly a prgraming language), FORTRAN :) , DarkBasic, OpenGL (toyed with it), 8086 Assembly (some HLA, nothing indeep), STK80 (Z80 Machine code), Java (shudder :( ), woops forgot about RUBY(toyed with it, this was smooth like butter, hmmm butter)

the scripting type languages : raw HTML with CSS (hand coding), Latex,and tiny bit of javascipting. XML, SQL (is that under scripting or programing langauge? probably more language I guess)

I want to pick up other languages (C# is looking tasty!) and one day I'll go back to assembly, but I think every tool has its place for the right job.

I hope not to start any kind of language wars, because frankly the internet is full of them lol :)

I don't diss on any langauage I think they all have pros and cons, they are just tools!

Thanks for the support, I've got it to work, now need to add a few things here and there and I'm done :)
 
Last edited:
We'll talk about VB later :)
I have never looked down on it (some do) and in fact there were alot of advantages.
That's for another day though.

By school, I meant university , yes.

as for "Thermally Generated Electron Hole Pairs", I have to laugh, they made me start there too. I thought why the hell do I have to learn this crap for?
Little did I know, that IS electronics. lol.

:)
 
That's quite a list of languages.

I used to use VB6 until .net came out. Then I dopped it because the GUI in c++ was so improved. In VB I used alot of API calls with some from my own c++ dll's. VB6 was good for quick utilities but did lack the speed of c++.

Thanks to the CLR I have no reason to use VB anymore. Oh well, onward and upward. I haven't tried Java. Looks like it's here to stay though.
 
Hey Raptor, sorry for the late repsone (or zero respone of late) I came down with the Flu, been vomiting for two days, on the plus side, I think I'm getting better. I dont; have enery to type antmore

edit: HP newyear
 
Happy New Year Anhar.

I assumed you were focusing on your coding with the deadline and all. Not a good time to get sick. Isn't that always the way.
See you when you get better.
 
Hey Tom. Not a math guy then I take it? I'm not either but I still find it fun.

Anhar, I've got something for you in the works. I just remembered several years ago I scanned the first chapter out of a book covering the origins of 3D mathematics.
It is a mind numbing read. I'll post a page when I locate the archive. The author describes the origin of the 3D plane equation and proves it using some amazing concepts in mathematics. Hopefully I have the ISBM number so you could locate the book. Look for that in a few days.
 
I can do the math, it just makes my head hurt. :grin:

Math was always my strong point in high school. If I applied myself, I could be good at it. The only math I really want to work on is compositing math... like OVER operations... A+B(1-a), stuff like that. :)
 
Raptor, I hope you do find it, I've been wanting to understand 3d maths from the "ground up" for a long time, most books just gloss over basics and fundermentals which is actually what I'm after!
 
I have the first two chapters. Send me a PM with an e-mail address and I'll send an attached zip ( 5MB ).

The book is 'Vector Analysis' by Murray Spiegel ISBN 0-07-099009-3.

Also for anyone interested in math for 3D, here's a place I visit sometimes. Geared for game programming but some people are working on thier own fluid sims as well, physics ect.

http://www.devmaster.net/forums/
 
Back
Top