Defined color change for shape's intersection

Let the developers know what you think of the software and what can be done to either improve the CFDG language or the Context Free program.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
User avatar
DeFleur
Posts: 41
Joined: Sat Feb 07, 2009 7:49 am
Location: Switzerland

Defined color change for shape's intersection

Post by DeFleur »

As a tool for design development, a specific color change for shape intersections (of e.g. 2 partly overlapping shapes) would be great (at least at same z -level). Or ideally, even a new shape rule for the shapes' intersection (thus allowing automatically new color definitions) would be interesting. Don't see it yet with CF2, and will CF3 bring it ?
kind regards from DeFleur

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Re: Defined color change for shape's intersection

Post by MtnViewJohn »

What kind of color change on shape intersection? If the shapes are not opaque then there will be color blending where they overlap.

User avatar
DeFleur
Posts: 41
Joined: Sat Feb 07, 2009 7:49 am
Location: Switzerland

Re: Defined color change for shape's intersection

Post by DeFleur »

Wassilij Kandinsky is using many times a display mode where the shape's
intersections have a - wanted & defined different color - not just the non-opaque superimposition of colors - http://www.google.de/search?q=wassily+k ... 96&bih=573

Simple example - 2 square shapes turned 90 degrees overlapping to form a cross. For opaque shapes the quadratic center's color is either shape 1 color or shape 2 color depending on z plane, or superimposed if non-opaque. My idea is that for such shape's intersection one can define specific colors which are not derived from either shape 1 color or shape 2 color. Right now I only can rebuild the overlapped shape with defining a new shape of same form to give it a specifically wanted color. Example again - square shapes forming a cross. Square shape 1 is red, shape 2 is green. The quadratic center overlap for opaque case is either red od green, depending on +/- z chosen. For non-opaque shapes the superimposed quadratic center is of combined red & green color - whatever outcome. But I wish to have the quadratic center straight blue. Today I only can define an extra quadratic shape of the overlapping center and give it the blue color. In an ideal advanced case the overlapping shape of shapes to create a newly defined shape which then can get transformed in whatever way - e.g. color attribute, even size etc.. This would be my idea. Other example - two circles overlapp. The cross section has a lense shape. This lense shape to be created by CFx on demand of user, allowing redefining color and other attributes, even shifting for e.g. further transformations.
kind regards from DeFleur

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Re: Defined color change for shape's intersection

Post by MtnViewJohn »

A general overlapping shapes feature would violate the context-free nature of Context Free. But there could be some sort of primitive shape combining feature that takes the scan-lines from several primitive shapes and combines them with boolean operators (union, subtraction, intersection, and exclusive-or).

Code: Select all

shape cross {
    <vbar - hbar>[vertical color]
    <hbar - vbar>[horizontal color]
    <hbar * vbar>[intersection color]
}
I don't think that I want to delay Version 3 to implement this though.

User avatar
DeFleur
Posts: 41
Joined: Sat Feb 07, 2009 7:49 am
Location: Switzerland

Re: Defined color change for shape's intersection

Post by DeFleur »

Thank you for reply. I don't want that my idea distracts you into a delay of CF3 which the community is awaiting with high attention. Anyhow - a big THANK YOU for all your work done. So I suggest to close the topic - OK?
kind regards from DeFleur

Post Reply