Message Boards Message Boards

0
|
1264 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to apply an interpolated vector function to transform a region?

Hi! I'm trying to apply an interpolated vector function (outputs and inputs in two dimensions) to transform a region. I'm running into an issue where instead of applying the transformation, mathematica seems to just ouput exactly what I wrote in the code. I think this happens when the headers of the objects input aren't correct, but I don't think there's anything wrong with my input--the interpolated function is a function exactly as the TransformedRegion[] function requires. I've tried defining functions from the interpolated data many many different ways, but none have worked. Here's the snippet of the code that isn't working.

i=4
data = Table[{groupedCellCentroidListPre[[j]][[1]], 
    groupedCellCentroidListPre[[j]][[2]],
    groupedCellCentroidListPost[[j]]}, {j, indeces}];
stretchFunction = Interpolation[data, InterpolationOrder -> All]

stretchFunction[560, 777]
TransformedRegion[groupedCellRegionListPre[[i]], stretchFunction]

All the lists are valid lists of vector data points. Here's the output to that code:code output If anyone knows how to help with this it would be greatly appreciated! Thank you!

POSTED BY: Kaden Tro
2 Replies
Posted 1 year ago

I can't actually do any debugging since you didn't provide all your definitions (so I can't actually run your code). However, TransformedRegion doesn't display the region by default. If you want to display the region, wrap it in Region or RegionPlot.

POSTED BY: Eric Rimbey

Ok, I've updated the post with the relevant variable initializations as csv's. I wasn't sure how else to show them on the post. This is the output from wrapping in region plot: enter image description here

POSTED BY: Kaden Tro
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract