@JM There's an example on the help page for ImagePerspectiveTransformation where they use something like t = FindGeometricTransform[...]; ImagePerspectiveTransformation[img, t[[2]], ...]
Apparently a TransformationFunction contains the transformation matrix.
@Heike Oh, no. The structure of the output of FindGeometricTransform[] is {error, TransformationFunction[(* stuff *)]}, so it makes sense to just use the second component.
(I'm in fact using the "Get coordinate" menu on the original image on point whose coordinate I know, FindGeometricTransform, and then trying to apply it; With MMA8. No error message). However I can use other transform, like the documentation's example with "Sqrt"
@WilliamBriand In ImageTransformation. Although make sure you save your stuff first. I just managed to crash mathematica while playing around with ImageTransformation
@Heike : Thanks. "PlotRange -> All" also kills the kernel on my box. @J. M. : After using your snippet, ImageTransform returns something that could be the down-left end of the image (from the colors). The image goes out of frame. If this is the problem, I fear I don't understand the concept of the transforms.
ah, that. :-) I know I don't have time to complete a blog article right now so I didn't bother to set that up. Is there an urgency to this? (Am I annoying you by not dealing with it?)
I'll need a username and an email address. If don't want to use your current address, just create any throwaway one. The email will only be visible to other people with a blog account (or possible only blog admins, this is not clear to me).
But you will need it to reset your password, so don't just throw it away ;-) (This happened yesterday---the SE blog network was hacked)
@MrWizard Yes, it does. We could publish a post this minute if we wanted to, but people want to wait until graduation. There is actually a Hello World post mostly ready, for that occasion (written by Verbeia)
And sorry that I wasn't able to chat with you about the code injection functions a few months back. I was really busy at that time, with finishing my degree... I'm much freer these days
@MrWizard BTW if you'd like to contribute to any projects on GitHub (e.g. the image uploader ;-) ), there's a very easy GitHub interface now for Windows: windows.github.com
Is there auto-indenting feature that can be used in code cells, or do I need to type the correct amount of spaces at the start of each line? I'm thinking of a feature that'll auto indent the next the the same amount the current line was (after pressing enter)
@Szabolcs, good luck with that. I guess you can always do a brute force replacement of tabs by 2-3 spaces and in the meatime work with smaller TabSpacings
I have a palette including this button:
CreatePalette[{
Button[
"m-editor",
Module[{modifyCodeStyle},(*by David Reiss*)
modifyCodeStyle[nb_NotebookObject, Notebook] :=
Module[{styledefs, editable},
editable = Editable /. Options[nb, Editable];
SetOptions[nb, E...
It sets AutoIndent to True instead of Automatic. True repeats the nubmer of \ts on the previous line, whiel aAutomatic does that [IndentingNewLine] that is magically interpreted by the FE
With TabSpacings you can reduce the space from 4 to whatever
record = ""; i = 1; While[record = Read[str, Record]; record != EndOfFile, Print[i]; i++; ];
Close[str]
But when I run it, nothing is printed. So I have a bug somewhere. Can you please help me?
I don't think I want to read the entire file at once using 'ReadList', because my actual text file is very long and is too large to be reasonably imported using Import.
In case any of you re-downloaded the image uploader, I just fixed a show-stopper bug in the History part ... I think I'll clean it up significantly tomorrow
@szabolcs All of the sudden I lost the ability to run the MS C compiler from mma. And I don't get the reinstall to work. Uninstalled everything. Installed VC 2010 and the SDK. SDK install breaks off. Uninstalled VC2010. Installed SDK only. Breaks off again. Forgot how I installed it at the time. Any tips?
Tag wiki excerpts show up as truncated from the front for example in the Tags list view (where one can search for specific tag names):
Though all of these tags have correct excerpt texts, starting with capitalized words, e.g. contexts:
Contexts are used in Mathematica to organize defined ...
In a nutshell: I want a button that if pressed and dragged, applies some function to the dynamic value of MousePosition@"ScaledScreen" (that returns the mouse position from anywhere on the screen).
Naturally I want the output value (f@MousePosition@"ScaledScreen") be dynamic as well.
@Istvan, With dragged you mean, you do the first click inside the button, and it updates as long as you hold the click, moving the mouse anywhere on the screen
Consider a scalar field (in polar co-ordinates), $f(r) = l-r$.
Now I want to evaluate the field integral over a circular region of radius $b$, centered at a distance of $x$ from the origin. According the law of cosines, The arc of radius $r$ from the origin subtends an angle of $\theta = 2 \arcc...
@Rojo Bullseye. That is what I was looking for. Such a pity that I could not figure it out on my own, though I got that far that I wanted to use DynamicWrapper...
@Rojo It does not work with a simple Dynamic instead DynamicWrapper. Anyway, I will do a bit of experimentation tomorrow, before any acceptance (to leave room for others to join).