38,199 reputation
554157
bio website
location
age
visits member for 2 years, 4 months
seen 20 mins ago

Oct
22
comment Function generating a rule with a Patterns: e.g. toRule[ lhs, rhs] into lhs[x_] -> rhs
I'm sure this is a duplicate but I can't find it. For a quick fix try toRule[l_, r_] := l[x_] -> #&@ r
Oct
22
comment How to remap a fisheye image?
@ErikP, sorry - I misunderstood the aim of the remapping. This must be the highest number of upvotes I've ever had for an answer which utterly fails to answer the question!
Oct
22
comment Refer to next element of list when iterating using Map
Alternatively 1 + list + PadLeft[list, 4, 0, 1]
Oct
21
comment Strange Behavior when making Equal Listable in Pick
I think this is related to this question. Range gives a packed array, for which Equal has special handling which bypasses the main evaluator.
Oct
21
comment How to remap a fisheye image?
Seems to work if you evaluate f symbolically, e.g. g[{x_, y_}] = f[{x, y}]; ImageTransformation[image, g]
Oct
16
comment Compatibility issues for Combinatorica package
@ybeltukov, you got my upvote for taking the trouble to write a proper answer :-)
Oct
16
comment Compatibility issues for Combinatorica package
The problem is that AdjacencyGraph returns a Graph object, which is different from the way graphs are represented in Combinatorica. Try ChromaticNumber[FromAdjacencyMatrix[graph]] instead.
Oct
16
comment How to capture implicit fails in Plot or Show?
Check will only catch kernel messages. The pink boxes you see are formatting errors generated by the front end. Have a look at rcollyer's answer here for a way to check for these errors.
Oct
13
comment Strip waste braces in nested list
@m_goldberg, if we were playing code golf I would have written it as +FlattenAt[#, #~Position~{_List}] & :-)
Oct
11
comment Insphere for Irregular Tetrahedron
@YvesKlett, Graphics3D@{Opacity[0.5],Polygon[{a,b,c,d}~Subsets~{3}]}
Oct
11
comment Placing text inside a region with RegionPlot
This might be useful
Oct
10
comment Cannot change ImageResolution after applying ImagePad
I think you have confused yourself slightly by referring to Graphics expressions as images. Your tempimage is not an Image, it is a Graphics expression. As Alexey notes, when ImagePad receives an argument which is not already an Image it must rasterize it. This rasterization takes place behind the scenes, using default settings. As you have discovered, if the default settings are no good for you, you need to do the rasterization explicitly with your preferred settings instead of having ImagePad do it automatically.
Sep
27
comment How combine pure functions of several slots?
Would a replacement based approach work for you, e.g. thru[expr_[vars__]] := expr /. f_Function :> f[vars]
Sep
22
comment Programmatic approach to HDR photography with Mathematica image processing functions
@belisarius, thanks. I think this must have been updated in version 9. CreateHDRI and ToneMapHDR seem to be working nicely now.
Sep
21
comment johansen test error in code
There is a version of this code on @Verbeia 's website, using the old AppendRows function. I think this should be replaced with Join[##,2]& rather than just Join.
Sep
19
comment Matrix generation
@Hpaudel, try Array[M, 30, 1, Dot]
Sep
17
comment Behavior of Graphics`Mesh`InPolygonQ with self-intersecting polygons
@Avi, I think the winding number must always increase or decrease by 1 when you cross the polygon boundary, so holes will always have an even winding number.
Sep
15
comment Replace inside a Held expression separate context
@Liam, if that's a problem why not just strip out the Defer with a replacement /. Defer[x_] :> x
Sep
14
comment Manipulate and function definition
Because b is not explicitly present in the body of Manipulate it is not being tracked. You need to add TrackedSymbols :> {b} to the Manipulate options.
Sep
13
comment FindFaces: how to improve the results of the face recognition feature
@cormullion, yep. I'm sure WRI have their reasons for it, but it can be quite frustrating sometimes.