Lets say

I want a building in the shape of a Pommes duchesse
What would you do?
In Designscript please

First I would Google Pommes duchesse.

Then I would look over the image results, and fail to pick out a consistent, classic shape amongst the image results. What I did see was a series of slightly deforming ribs which climb a swept blend of sorts… So likely building the basic mass via sword blend, with a bit of randomization on both the path and the profile curves. Then pull isocurves at given distances, and build coordinate systems along each loop. The coordinate systems could then be shifted in adjacent rows using a patterned offset to build a spiraling pattern as the curves climb the surface. Transpose the resulting ordered pairs, and place raised or recessed points (+ on the local X axis or - on the local X axis) to get a series of points. Transpose the lists back into deformed rings instead of isolines, and build a nurbs curve along each ring. Lastly loft between the series of values, and bake in the oven at 200 degree… err run the graph and enjoy the results.

2 Likes

Pommes duchesse.dyn (17.2 KB)

More work to be done, but starts it off. Node to Code can make this design script friendly.


Me: Would there be any issues for its constructability?

ChatGPT: Yes, there would be several issues:

  1. Structural Integrity: The intricate ridges and swirls of a Pommes Duchesse shape might not support a building’s weight without substantial internal support.
  2. Materials: Mimicking a golden-brown exterior that looks like a crispy potato would be challenging with conventional building materials.
  3. Functionality: The unusual shape may lead to inefficient space usage and could complicate layout planning for utilities and services.
  4. Building Codes: It might not meet local building codes and zoning regulations.
  5. Environmental Impact: The design could affect the building’s energy efficiency and environmental footprint.
  6. Cost: The complexity of the design could significantly increase construction costs.

Me: would such a building help sell potato dishes?

ChatGPT: Yes, such a building could attract attention and interest, potentially increasing the sale of potato dishes due to its novelty and thematic connection. It could serve as a marketing tool and a tourist attraction.

Me: Write python code for dynamo revit to represent its shape…

potato house - Made with Clipchamp

import sys
import math
import clr
import random  # Import the random module
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

def create_pommes_duchesse_profile(base_radius, ridge_count, min_ridge_height, max_ridge_height, offset):
    points = []
    angle_step = 360.0 / (ridge_count * 2)  # Two points per ridge (peak and trough)

    for i in range(ridge_count * 2 + 1):
        angle = math.radians(i * angle_step)
        if i % 2 == 0:
            # Apply randomness to the troughs as well
            radius_variation = random.uniform(0, max_ridge_height - min_ridge_height)
            radius = base_radius + radius_variation
        else:
            # Randomize the ridge height within the given range
            radius = base_radius + random.uniform(min_ridge_height, max_ridge_height)
        # Since it's in the ZX plane, x will be our vertical coordinate (up), and z will be horizontal
        z = (radius * math.cos(angle)) + offset  # Offset ensures all points are greater than 0
        x = radius * math.sin(angle)
        points.append(Point.ByCoordinates(z, 0, x))  # y is 0 since the profile is in the ZX plane

    # Close the curve by adding the first point at the end if it's not already there
    if points[-1].IsAlmostEqualTo(points[0]):
        points.pop()  # Remove the last point if it's the same as the first

    return PolyCurve.ByPoints(points, True)

# Parameters for the profile
base_radius = 3.0  # Base radius for the troughs
ridge_count = int(IN[1])   # The number of ridges
min_ridge_height = 0.5 # Minimum height of the ridges
max_ridge_height = 1.5 # Maximum height of the ridges
offset = base_radius + max_ridge_height  # Offset to ensure all points are in the positive ZX plane

# Seed the random number generator for reproducibility
random.seed(IN[0])

# Create the profile
pommes_duchesse_profile = create_pommes_duchesse_profile(base_radius, ridge_count, min_ridge_height, max_ridge_height, offset)

OUT = pommes_duchesse_profile

Getting the image color:

from PIL import Image

def get_average_rgb(image_path):
    img = Image.open(image_path)
    avg_color = img.resize((1, 1)).getpixel((0, 0))
    return avg_color

image_path = 'D:\Downloads\DALL·E 2023-11-02 11.10.28 - Oil painting of an urban plaza featuring a building in the form of an oversized Pommes Duchesse, with people of diverse descents and genders walking a_cr.png'
rgb = get_average_rgb(image_path)
print(rgb)

get_average_rgb.py
(161, 111, 65, 255)

3 Likes

with explanation of code
Pommes Duchesse.dyn (25.0 KB)

3 Likes

Hola amigos, I have to google it to, is just play with geometry is enough complicated i must say geometry by loft gives troubles dificult solve; can i have a winner of comunity challenge badge this time?? :smiley:

3 Likes