Hi Barend, I really appreciate your example code, it helped me a lot. Attached you can find my source code. In my implementation of the anisotropic buffering I didn't know how to make use of the distance strategy, as it was possible to make it work using only side and join strategies. I encountered strange behavior when changing number of points describing a full circle. Using 360 points produced a good output, whereas 90 points caused only the second polygon to be buffered (see attached figures). I would be thankful if you could help me to resolve this issue as well as for any remarks to my code. Best, Grzegorz 2014-10-29 23:18 GMT+01:00 Barend Gehrels [via Boost] < ml-node+s2283326n4668567h4@n4.nabble.com>:
Hi Grzegorz,
gchlebus wrote On 24-10-2014 16:44:
Hi,
I am wondering whether it would be possible to achieve anisotropic buffering (distances in neg x, pos x, neg y, pos y can have different values) of a polygon using the buffer function with custom-implemented distance strategy. What I want to achieve is presented on the figure 2-b in the following paper:
http://itcnt05.itc.nl/agile_old/Conference/mallorca2002/proceedings/posters/...
I would be grateful to hear from you whether it is doable, and if
positive,
how one could implement such a custom distance strategy. The current distance strategy has (currently) no means to get the angle, or a vector of the new point to be buffered. We can consider adding that.
However, by writing custom strategies for join, side, point (for point-buffers) and possibly end (for line-buffers) you should be able to create this, because these have this information.
Attached a program doing similar things with polygons and points (I vary the distance based on angle - you will have to do something with your anistropic model).
The output is also attached.
The program defines three custom strategies, all based on the same mechanism, to create interesting output. I did not do the end-strategy but that would look similar, you can look at the provided end-strategy (round) and apply the same function.
Regards, Barend
_______________________________________________ Boost-users mailing list [hidden email] http://user/SendEmail.jtp?type=node&node=4668567&i=0 http://lists.boost.org/mailman/listinfo.cgi/boost-users
*buffer_point_circle.cpp* (6K) Download Attachment http://boost.2283326.n4.nabble.com/attachment/4668567/0/buffer_point_circle.... *bufferpol.svg* (10K) Download Attachment http://boost.2283326.n4.nabble.com/attachment/4668567/1/bufferpol.svg *buffer.svg* (16K) Download Attachment http://boost.2283326.n4.nabble.com/attachment/4668567/2/buffer.svg
------------------------------ If you reply to this email, your message will be added to the discussion below:
http://boost.2283326.n4.nabble.com/boost-geometry-buffer-distance-strategies... To unsubscribe from [boost.geometry] buffer distance strategies, click here http://boost.2283326.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4668469&code=Z2NobGVidXNAZ21haWwuY29tfDQ2Njg0Njl8LTExMTg0ODQ4MTY= . NAML http://boost.2283326.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
main.cpp (9K) http://boost.2283326.n4.nabble.com/attachment/4668617/0/main.cpp bufferpol_90PointsFullCircle.svg (2K) http://boost.2283326.n4.nabble.com/attachment/4668617/1/bufferpol_90PointsFu... bufferpol_360PointsFullCircle.svg (9K) http://boost.2283326.n4.nabble.com/attachment/4668617/2/bufferpol_360PointsF... -- View this message in context: http://boost.2283326.n4.nabble.com/boost-geometry-buffer-distance-strategies... Sent from the Boost - Users mailing list archive at Nabble.com.