|
This problem can be seen as finding intersection of two circle.
also this problem will have two solutions.
How to imagine it as problem of intersection of two circles.
Circle 1 center point be A with radius AC and circle 2 as of center B and radius BC.
Note: ACB angle 90 degree information is redundant and is not required
check out the below link to find the solution of intersection points of two circles and well as the c code to do it. The c code can be directly used for your purpose.
http://ozviz.wasp.uwa.edu.au/~pbourke/geometry/2circle/[^]
You could have found a faster solution in mathematics and algorithm discussion section.
|
|
|
|
|
Cosmic Egg wrote: Note: ACB angle 90 degree information is redundant and is not required
Also distance between A and B is redundant (we've their coords).
Generally speaking, two pieces of info are redundant.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I knew ~pbourke site long times ago it was great. The solution is very near and seems obvious.
Mathematics thread seems not so populated, also I would not met there me friends
chesnokov
|
|
|
|
|
Does anyone know the alg/code tutorial to skew the image like in GDI+ DrawImage but using 4 destination points to take into account 3D depth. The skewed image needs to be put onto simple GDI+ bitmap, so if OpenGL does this trick with texture mapping and drawing it to MFC GDI+ bitmap?
1
|\
| \
| \2
| |
| /4
| /
|/
3
chesnokov
|
|
|
|
|
I have been searching for this for long time
finally i got this Anti aliased transform[^]
But it is very slow.. Let me know if you get anything else.
Regards,
Sandip.
|
|
|
|
|
How much slow it is in milliseconds? Say to draw 80x60 skewed that way image onto 640x480 bitmap?
chesnokov
|
|
|
|
|
Dont remember now exactly..
But it has a sample application you can test with that..
BTW: there is another library Anti Grain Geometry[^] Check if that helps.
Regards,
Sandip.
|
|
|
|
|
that is exactly I was looking for.
chesnokov
|
|
|
|
|
It might be slow as it uses GDI. It needs to be converted to GDI+ objects.
chesnokov
|
|
|
|
|
Yes probably with LockBits()/UnlockBits() it might be fast
Let me know if it improves performance.
Also one request if you are going to convert it to GDI+ Please post a article for the same on CP.
Regards,
Sandip.
|
|
|
|
|
Chesnokov,
Not exactly an answer to your question, but following website efg[^]has helped me understand couple of algorithms about image processing (it's been around 5-6 years now). The site still exists. I am not sure how often they update this website, but there might be few links relevant for reference.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hello everyone,
I find when a C++ console process loads, the DLLs msvcp90d.dll and msvcr90d.dll are always loaded. My question I want to find the different functions of the DLLs and why CRT runtime provides two DLLs other than one.
I have not find any formal information from search. I just did some self analysis and find msvcp90d.dll exports C++ functions and msvcr90d.dll exports C functions. I am not 100% sure. Any ideas?
thanks in advance,
George
|
|
|
|
|
That's because one contains the MS C Runtime and the other the MS Standard C++ Library and Standard Template Library. You can use msvcr90.dll from 'C' as well as C++ but msvcp90.dll is designed only to be used from C++, hence they're split. It may also be down to the sheer scale and historical baggage associated with the projects. The C Runtime is a big enough beast on its own without trying to put the Standard library in the same package. Also the C Runtime is I think basically a Microsoft in house development whereas the C++ Standard library is developed in cooperation with Mr Plauger's DinkumWare.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks Matthew,
1.
Let me confirm, you mean msvcp90d.dll for C function and msvcr90d.dll for STL function, correct?
2.
In my previous understanding, STL is built with source code directly into our program, as you can see when installed with VC, the source code for STL is avaliable. So, I am confused why we need an DLL for STL. Please feel free to correct me if I am wrong.
regards,
George
|
|
|
|
|
1. No, msvcr90 for C and msvcp90 for STL and Standard C++ library.
2. Yes STL is mostly headers but STL is only part of the Standard C++ library, msvcp90 contains the whole Standard C++ Library. Source is actually provided for both the Standard Library and the C Runtime.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks Matthew,
I agree with 1 but confused about 2. I have checked that for header files like vector and string, it should contain all implementations required, why need additional library implemented in msvcp90d.dll? Could you show me an example please why the header file like string/vector is not enough and additional source are needed (and the sources are built into library msvcp90d.dll)?
regards,
George
|
|
|
|
|
string and vector are fine as just headers, STL is designed that way. I can't remember at the moment which things require the Dll, the best way to find out is to open it with Depends.exe and look at the exports...
...Hmm that doesn't work too well either as msvcp imports loads of stuff from msvcrt and then exports some of it along with lots of things like char_traits that can be used by just including the headers. I'll have to look into it further as I'm writing my own C++ Runtime. Lets us know if you find out
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks Matthew,
Using depends to see exports of msvcp90d.dll -- there are a lot of functions, looks like all STL functions are exported! I think file vector/string is not just a header file, but also contain implementations inline, so I do not think there are anything missing. I do not know why need an additional DLL. Any comments?
regards,
George
|
|
|
|
|
George_George wrote: why need additional library implemented in msvcp90d.dll?
Don't know. Why you need to ask here rather than read the documentation on the subject?
led mike
|
|
|
|
|
Hi led mike,
I have not found any formal document mentioning what is the function of msvcp90d.dll, document just said it is for STL standard library, but as we can see all STL stardard library code are provided in source format, like file vector/string. I do not know why need an additional DLL. Any comments?
regards,
George
|
|
|
|
|
George_George wrote: I have not found any formal document mentioning what is the function of msvcp90d.dll
http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx[^]
Multithreaded, dynamic link (import library for MSVCR90.DLL). Be aware that if you use the Standard C++ Library,
your program will need MSVCP90.DLL to run.
led mike
|
|
|
|
|
Hi led mike,
I have read it, and my confusion is in my understanding STL is provided by source form, means the application build code with STL source code directly, I am not sure why we need an additional DLL, msvcp90d.dll?
regards,
George
|
|
|
|
|
George_George wrote: my confusion is in my understanding STL
Your confusion is because you can't READ. Where in that article or the section I posted do you see any reference to STL? WHERE?
LEARN HOW TO READ
led mike
|
|
|
|
|
Hi led mike,
I actually have read the document you referred. But my confusion is, in files such as vector/string, it already contain source codes (so that we can build such source codes directly into our projects) and why additional DLL is needed?
regards,
George
|
|
|
|
|
You didn't answer my last question.
led mike wrote: Where in that article or the section I posted do you see any reference to STL? WHERE?
LEARN HOW TO READ, it will help you, really Really REALLY help you.
led mike
|
|
|
|